You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make a decorator accepts that takes as many arguments as the function takes. That decorator specify the types of the arguments that your function takes. If any of the arguments does not match the type in the decorator raise a TypeError
Examples
@accepts(str)defsay_hello(name):
return"Hello, I am {}".format(name)
Ansible is an open source automation platform. It is the simplest solution out there but it is very powerful. You can use Ansible to manage your infrastructure, deploy your application, and automate tasks. It is so simple that their motto is: "Automation for everyone!"
So if you are tired of setting up VPSs manually you should definitely consider an automation framework like Ansible, Puppet or Chef.
Why are we using it?
Django is a great framework when it comes to productivity. But what happens when it comes to deployment on a VPS? Who is going to setup the infrastructure and how? Do we really have to deal with all the postgresql configuration, the NGINX files, the upstart jobs that keeps our gunicorns alive? :(