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

Little django application that exposes the sepomex database in a RESTful way.

Installation

$ pip install django-tastypie-sepomex

Configuration

  1. Once installed, you must add sepomex to your INSTALLED_APPS
INSTALLED_APPS += ['sepomex']
  1. Apply migrate command to add the sepomex models to your database.
$ python manage.py migrate sepomex
  1. The sepomex data is provided in a file called sepomex-data.tar.gz, you need to extract the content.
$ tar xvf sepomex-data.tar.gz
  1. Populate your sepomex models
$ python manage.py loadsepomex

This command will call the loadmxstates and loadmxmunicipalities commands. It finally will fill the sepomex_mxasentamiento table to complete the process.

Run your server

$ python manage.py runserver

… and use the endpoints provided

Get the list of states

There are 32 states, so we pass that as a query string.

$ curl localhost:8000/api/v1/mxestado/?limit=32

List first 20 municipalities for Coahuila

Coahuila’s id is 5. If not specified, the limit objects per query is 20

$ curl localhost:8000/api/v1/mxmunicipio/?mx_estado__id=5

Activate sepomex logger

Example of LOGGING dict in settings.py. You might have more loggers.

LOGGING = {
    'version': 1.0,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'class': 'logging.StreamHandler'
        }
    },
    'loggers': {
        'sepomex': {
            'handlers': ['console'],
            'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
        },
        # Your loggers here
    }
}
Release History

Release History

0.1.0

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.0.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

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-tastypie-sepomex-0.1.0.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Nov 30, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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