📡 pyden: A simple Python API for Denver, CO Data
pyden is a simple library to get data from the city and county of Denver, CO.
PLEASE READ: Version 1.0.0 and Beyond
Version 1.0.0 of pyden makes several breaking, but necessary changes:
- Moves the underlying library from Requests to aiohttp
- Changes the entire library to use
asyncio - Makes 3.6 the minimum version of Python required
If you wish to continue using the previous, synchronous version of
pyden, make sure to pin version 0.4.1.
Python Versions
pyden is currently supported on:
- Python 3.5
- Python 3.6
- Python 3.7
However, running the test suite currently requires Python 3.6 or higher; tests run on Python 3.5 will fail.
Installation
pip install pyden
Usage
pyden starts within an
aiohttp ClientSession:
import asyncio
from aiohttp import ClientSession
from pyden import Client
async def main() -> None:
"""Create the aiohttp session and run the example."""
async with ClientSession() as websession:
# YOUR CODE HERE
asyncio.get_event_loop().run_until_complete(main())
To create a client, simply:
import asyncio
from aiohttp import ClientSession
from pyden import Client
async def main() -> None:
"""Create the aiohttp session and run the example."""
async with ClientSession() as websession:
client = Client(websession)
asyncio.get_event_loop().run_until_complete(main())
Trash Schedule
import asyncio
from aiohttp import ClientSession
from pyden import Client
async def main() -> None:
"""Create the aiohttp session and run the example."""
async with ClientSession() as websession:
client = Client(websession)
# Initialize the trash module:
await client.trash.init_from_coords(<LAT>, <LON>, "<GOOGLE_API_KEY>")
# Get the full schedule:
await client.trash.schedule()
# ...or get the date of next pickup:
await client.trash.next_pickup(client.trash.PickupTypes.recycling)
asyncio.get_event_loop().run_until_complete(main())
Contributing
- Check for open features/bugs or initiate a discussion on one.
- Fork the repository.
- Install the dev environment:
make init. - Enter the virtual environment:
pipenv shell - Code your new feature or bug fix.
- Write a test that covers your new functionality.
- Run tests and ensure 100% code coverage:
make coverage - Add yourself to
AUTHORS.md. - Submit a pull request!
Metadata
Release files for pyden 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyden-1.0.4.tar.gz | 6.1 kB | Without provenance | Details for pyden-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyden-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for pyden-1.0.4-py3-none-any.whl |
Total release size: 11.9 kB
Release files / pyden-1.0.4.tar.gz
| Download URL | pyden-1.0.4.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75a9d5c0be5a06df08d0bcb1a9e034bc8c4271108a25e80cab01fe668aba975f
|
|
BLAKE2b-256 checksum How to use checksums |
9d9c95dd50ea739ea1eb698947cc380dd7b7f78c9f2982e76e841b6356fb1081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Release files / pyden-1.0.4-py3-none-any.whl
| Download URL | pyden-1.0.4-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8622104dfc865c2be1f615f32a29357d6a1d11f6266539a8288cbb4177fc40e
|
|
BLAKE2b-256 checksum How to use checksums |
6794bef0a2707fe5a9c6decbc70b86f4359ae50ceec48242d1db66f3de891d78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Security for pyden 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.