Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python wrapper around the Nagareyama Open Data Web API

Project Description

Sample

>>> from pyny import api
>>> data = api.get_by_id('c1161', 2)
>>>
>>> import pprint
>>> p = pprint.PrettyPrinter()
>>> p.pprint(data)
{'attrs': {'attr0': '市役所・出張所',
           'attr1': '出張所',
           'attr2': 'おおたかの森出張所',
           'attr3': '流山市西初石6-185-2(流山おおたかの森S・C内3階)',
           'attr6': '35.8706965',
           'attr7': '139.9261438',
           'attr8': '04-7154-0333 '},
 'created': '2013/07/19 17:01:02',
 'distance': 0,
 'feature_id': 2,
 'files': {},
 'geometry': 'POINT(139.9261438 35.8706965)',
 'layer_id': 'c1161',
 'mid': 0,
 'moduserid': 0,
 'status': 0,
 'user_id': 307}
>>>
>>> from pyny.models import Model
>>> from pyny.fields import DecimalField, StringField
>>>
>>> class SampleModel(Model):
...     layer_id = StringField()
...     longitude = DecimalField('attrs.attr7')
...
>>> data = SampleModel.get_by_id('c1161', 2)
>>> data.layer_id
'c1161'
>>> data.longitude
Decimal('139.9261438')
>>>
Release History

Release History

This version
History Node

1.1.0

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyny-1.1.0-py3-none-any.whl (8.6 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Jul 2, 2015
pyny-1.1.0.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Jul 2, 2015

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