This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django-docopt-command allows you to write Django manage.py commands using the docopt library. This means that you can define commands using usage strings.

References:

class Command(DocOptCommand):
    # This usage string defines the command options:
    docs = "Usage: command <option1> <option2> [--flag1]"

    def handle_docopt(self, arguments):
        # arguments contains a dictionary with the options
        pass

Django-docopt-command is tested with Django 1.8-1.10 and Python 2.7, 3.3-3.5 and is hosted on github.

Example

See the testproject/docopt_example in the django-docopt-command github repository.

Usage

Install django-docopt-command.

pip install django-docopt-command

Step 1 - management command

Write a Django custom management command, as described in Writing custom django-admin commands.

Step 2 - inherit from DocOptCommand

class Command(DocOptCommand):
    pass

Step 3 - add a docs string

class Command(DocOptCommand):
    docs = "Usage: command <option1> <option2> [--flag1]"

Step 4 - override handle_docopt

class Command(DocOptCommand):
    docs = "Usage: command <option1> <option2> [--flag1]"

    def handle_docopt(self, arguments):
        option1 = arguments['option1']
        option2 = arguments['option2']

License

Django-docopt-command is licensed under the Apache 2.0 License.

Release History

Release History

0.2.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_docopt_command-0.2.3-py2.7.egg (2.2 kB) Copy SHA256 Checksum SHA256 2.7 Egg Aug 2, 2016
django_docopt_command-0.2.3-py2-none-any.whl (3.4 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Aug 2, 2016
django-docopt-command-0.2.3.tar.gz (1.8 kB) Copy SHA256 Checksum SHA256 Source Aug 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting