Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm working as a system administrator/infrastructure engineer, and sometimes I am wasting my time on checking if everything working properly after infrastructure changes. I want to write some tests, such as:
Download some CSS/JavaScript code from a website
Login to website
Upload some file and try to download it
Login to a server and execute some script
And so on.
Most unit testing frameworks focused on unit testing and code coverage, but all I need is just a configurable runner for my tests with nice reporting and may be additional modules for ease of writing HTTP tests. Possibility to use this tool for stress-testing would be an advantage.
I've found many names (testoob, functest, robotframework, py.test, etc.), but I don't know what to choose.
Robot Framework has many nice libraries that would definitely help you - so you don't have to reinvent the wheel. For example, Robot Framework integrates with the Selenium web testing tool.
I think that from the tools that you mentioned Robot Framework is the most active project - py.test seems to be active also.
One thing that you should notice is that Robot tests are not written in Python directly, but they use a simple text based syntax. You can of course access Robots libraries from Python code if you want to or create your own robot library in Python code.
[DISCLAIMER: I am a member of the team that is developing Robot Framework]
I develop an open-source framework (part of Pycopia) that does exactly this. It's not complete yet (still working on the web UI), but it's usable to run real tests and get emailed reports. You write tests in Python, but it also manages test cases, test results, and equipment inventory.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Safaribooksonline.com has a video [1] from Jacob Kaplan-Moss about how to deploy a Django app. This video is from 2010. It refers to a site [2] that has a list of many relevant aspects.
Now the workshop mentions things like virtual machines, vagrant (as deployment environments) or Fabric and other tools for deployment automation.
I was wondering how much has changed since then. I can think of Docker replacing Vagrant. Or Heroku or AWS instead of renting a dedicated physical server for deployment (or virtual machines). Or using Ansible or Chef / Puppet instead of Capistrano or Fabric.
But what else has changed? What is still relevant? What is done differently? What is the state of the art in 2017 for deploying a production ready Django app.
Can anybody point me to good blogs / books / tutorials?
[1] "Django deployment workshop", https://www.safaribooksonline.com/library/view/django-deployment-workshop/9781449396442/
[2] "infrastructure of modern websites", https://randomfoo.net/2009/01/28/infrastructure-for-modern-web-sites
Honestly, the answer to this question will be extremely opinionated and defining best practices in ever-changing devops area can be challenging. Something is a best practice one day, and tomorrow someone makes a blog post about that being god awful and obsolete.
There are numerous ways to do deployment, but it all comes down to what do you need, how much do you want to automate and what level of customization is required.
For instance, at my current place we use CircleCI, Heroku, Sentry and
Rollbar.
One of my previous clients (three months ago) wanted us to use
CodePipeline which includes CodeCommit, CodeBuild, CodeDeploy for
AWS.
Recently I also worked on a project involving Docker and flexible
environment from Google App Engine.
For my personal projects I simply use Fabric and Heroku, but I'd really like to try the new CodeStar or whatever the name is on AWS.
Define what you want, how you want to customize it and simply do it. If something does not work out, just change it. Things are becoming easier to do and replacing one item in your pipeline can occur in matter of minutes and not days/weeks as it did. Nowadays every provider has support for Docker and CI, one way or the other.
YMMV.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm in the early phases of designing and implementing a python web project that i want to be able to easily distribute.
Coming from a primary PHP and Perl world i know how i would do the project in those lanuages but I am trying to find the best method for python.
Not sure if it matters, but I'm thinking of using django as the web framework, but still exploring other frameworks.
What i'm looking for is best practices to be able to bundle my application and have users just install it using pip.
Would i be able to package the wen application like that even if it using django or is that not the way its normally done? Would they instead just download the code and set it up like it was any other tar ball of code?
I tried searching around for this but i find mostly information on people deploying there own projects.
Thanks
Dan
The answer depends of the size of your project.
If it's a plugin that could be integrated to any web site, so probally just an app in the project, it's quite easy check the page of the django's doc
If it's a full websitethen it's a little bit more complicated, since a django project depends on multiple settings that could differ from one system to an other I usually see the project being installed from a tar ball.
I've seen packages like django-admintools bundle multiple apps in one package, but the user still need to create a basic django project.
From what I know a full project cannot be install only by PIP.. the user always need to setup settings and the webserver (apache or nginx).
I hope this helped you.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'd like to exercise MongoDB in a real world project so I'm wondering what are the Python frameworks that support MongoDB as the main database out of the box (and are well documented)?
If you're talking Web-Frameworks there's Tornado or Mongo-kit in Flask or Flask-PyMongo that have great support for MongoDB, but at the end of the day it's all easily pluggable.
I'm not sure what you mean by "out of the box" but I have successfully used MongoDB with Tornado web server in a number of projects.
You can very easily interface with MongoDB using several libraries. My favorites are:
PyMongo: http://api.mongodb.org/python/2.2/
Mongoengine: http://mongoengine.org/
IMO Mongonegine is an excellent tool for communicating to Mongo through Python and it is relatively well documented. I particularly like the fact that Mongoengine provides concrete examples in the documentation (which is really nice for a beginner).
You can use django-mongokit as excellent framework for your project. It bridges Django to MongoDB with the MongoKit ODM (Object Document Mapper).
As Django is most widely and successfully used in many projects, which has big community support and lots of packages are available that can be easily implement in the project.
We had successfully implemented it in our project which is available at github.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I develop open-source project in Python and I want it to be easy accessible for Windows users. So for each new source revision I need to generate new windows executable distribution with py2exe and upload it as a downloadable artifact for project users.
I'd rather not do it each time manually but instead I would like to write some type of script that will do both things (generation, upload) in single command, fully programically.
So the question is: are there any Open Source project hostings that provide simple API to make operations like uploading new version of distribution?
Currently I'm using Google Code but it doesn't support that feature (I expected it to be supported as Google Data Api Service but it isn't). I don't really know too much about other hostings - that's why I'm asking.
Check out the GitHub Downloads API or, if it's something suitable for packaging, then look at PyPI, the Python Package Index
Google Code does support it perfectly well: http://code.google.com/p/support/wiki/ScriptedUploads
Most other such sites do in a similar way; on one project on SourceForge, for example, I have a release script which uploads a file to the release system by FTP.
The Python Distutils that come with Python support uploading to the Python Package Index.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm working on a web application using isapi_wsgi and django-pyodbc. I'd like to have a way to install all dependencies and push the files out to the webserver. Unfortunately, some of these are easier said than done. In particular, handling dependencies is a pain as some of them won't install correctly even under setuptools (pywin32 is especially difficult).
Most of the tools that I see for automating this kind of stuff (fabric and capistrano) are made for use with unix-y systems. I would like to set up a continuous integration system, but that only solves part of the problem. Is there any way to make life easier for a Pythonista who's forced to use Windows/IIS?
BitNami provides free Windows Django all-in-one installers that include all dependencies to deploy a Django app on Windows. Disclaimer: I am one of the developers of this tool. If you are going for a hosted version, we also have free Windows Amazon Machine Images (look further down in that page) but in that case I would strongly recommend going with a Linux-based AMI.
Have you looked into Paver? It might not be the perfect solution, but maybe better then your current process.
And it has setuptools (and other useful wrappers) built-in.
Nowadays deploying your Django web project on a Windows based server has become less cumbersome. It's still challenging as most guides are geared towards Unix systems, but deploying on a Windows server is not impossible. Microsoft now provides some native support for Django with IIS.
However, you are not limited to IIS. You can use Apache + mod_wsgi. Here is one of my own test projects that you can deploy on Apache my web project.
Guide: Deploy Django with Apache and mod_wsgi on Windows Server 2019