Skip to main content

Asynchronous Python client for the Garages Amsterdam

Project description

Python - Garages Amsterdam Client

GitHub Release Python Versions Project Stage Project Maintenance License

GitHub Activity Forks Stargazers Issues GitHub Last Commit

Code Quality Maintainability Code Coverage Build Status

Asynchronous Python client for the garage occupancy in Amsterdam (The Netherlands).

About

A python package with which you can read the occupancy of a parking garage in Amsterdam (The Netherlands). Both for day visitors (short-term parking) and season ticket holders (long-term parking).

NOTE: Not all parking garages have data for long-term parking.

Installation

pip install garages-amsterdam

Usage

import asyncio

from garages_amsterdam import GaragesAmsterdam


async def main():
    """Show example on using the Garage Amsterdam API client."""
    async with GaragesAmsterdam() as client:
        garages: Garages = await client.garages()
        print(garages)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Data

You can read the following data with this package:

  • Name of the parking garage
  • API State (ok or problem)
  • Free space short
  • Free space long
  • Short capacity
  • Long capacity
  • Longitude
  • Latitude

Setting up development environment

This Python project is fully managed using the Poetry dependency manager.

You need at least:

Install all packages, including all development requirements:

poetry install

Poetry creates by default an virtual environment where it installs all necessary pip packages, to enter or exit the venv run the following commands:

poetry shell
exit

Setup the pre-commit check, you must run this inside the virtual environment:

pre-commit install

Now you're all set to get started!

As this repository uses the pre-commit framework, all changes are linted and tested with each commit. You can run all checks and tests manually, using the following command:

poetry run pre-commit run --all-files

To run just the Python tests:

poetry run pytest

License

MIT License

Copyright (c) 2021 Klaas Schoute

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

garages-amsterdam-3.0.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

garages_amsterdam-3.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file garages-amsterdam-3.0.0.tar.gz.

File metadata

  • Download URL: garages-amsterdam-3.0.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1022-azure

File hashes

Hashes for garages-amsterdam-3.0.0.tar.gz
Algorithm Hash digest
SHA256 bc55b6334371c4909e416269f3db3746f3f5bc8e90313ea4f662d73518868e4e
MD5 caaf4c623cdb4b603abbbd58b9504b8c
BLAKE2b-256 a2d6734365e41704eea41720e179f2e1dc15463d61ef76377846e2ef34507075

See more details on using hashes here.

File details

Details for the file garages_amsterdam-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: garages_amsterdam-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1022-azure

File hashes

Hashes for garages_amsterdam-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c26217bf017efcd11dda6f4300a5d13ca7205597656629de00cfe989d640848f
MD5 44713ad023996c43339464833ada0ca8
BLAKE2b-256 ae09735a2cfd0d5a06479ec8cb0690ba62c6e89e9d5ed2ef51a448267b0f18a9

See more details on using hashes here.

Supported by

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