Skip to main content

Python wrapper around the Nagareyama Open Data Web API

Project description

https://travis-ci.org/7pairs/pyny.svg?branch=master https://coveralls.io/repos/7pairs/pyny/badge.svg?branch=master

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')
>>>

Documentation

https://github.com/7pairs/pyny/blob/master/docs/usage.md

Project details


Download files

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

Source Distribution

pyny-1.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyny-1.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file pyny-1.1.0.tar.gz.

File metadata

  • Download URL: pyny-1.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyny-1.1.0.tar.gz
Algorithm Hash digest
SHA256 03b624131cfa6c27482bd2dafaa917495ddd205f9d2a3023601a87b85483660d
MD5 db8bba7f8fc6980310dd6e1fdbade83c
BLAKE2b-256 6296831db13a0a08f92381f2fa237f765c0b94188876d52f2be65b5e4a980340

See more details on using hashes here.

File details

Details for the file pyny-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyny-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d0a85419371385d2fabd3820ad081d2c8e960b4085a55a4839609ae0b11f9bd
MD5 beea6e4088a8133b1dcf0539abbe52b0
BLAKE2b-256 adf3c5b3b8f04a574ed80fb1bad70b26c0e1e16dac016bd6ae1a8e1aca240503

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page