Skip to main content

Package for handling public transport routes opening hours from OpenStreetMap

Project description

Transport Hours (Python version)

Read-me

TransportHours is a Python (2.7+) library for easy reading/writing of public transport hours present in OpenStreetMap. It interprets string values from OSM tags, and also converts your objects into string values to go back into OSM.

Install

From pip

Just run the following command in your development environment :

pip install transporthours

Using this repository

Download this repository, then embed the library into your own project :

from transporthours.main import Main

Usage

An example of usage is available in example.py file.

For more details about available functions, see API documentation.

Build & develop

For start developing on this library, run the following commands :

# Prepare python 2.7 environment
virtualenv env -p /usr/bin/python2.7
source ./env/bin/activate

# Install dependencies
make deps

# Run unit tests
make test

# Generate documentation
make docs


# Following commands are optional, but can be useful sometimes

# Run a single unit test
python tests/test_main.py MainTest.test_name_of_the_test

Publish on PyPI

# Put your credentials in .pypirc (only first time you want to publish)
vim ~/.pypirc

# Install Twine (only first time you want to publish)
pip install twine

# Be sure to have updated package version number
vim setup.py

# Build archives
python setup.py sdist bdist_wheel

# Check builds
twine check dist/*

# Test upload on TestPyPI
twine upload dist/* -r testpypi

# Real upload on PyPI
twine upload dist/* -r pypi

License

Copyright 2019 Jungle Bus & Adrien PAVIE

See LICENSE for complete LGPL3 license.

TransportHoursPython is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

TransportHoursPython is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with TransportHoursPython. If not, see http://www.gnu.org/licenses/.

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

transporthours-0.0.4.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

transporthours-0.0.4-py2-none-any.whl (17.3 kB view details)

Uploaded Python 2

File details

Details for the file transporthours-0.0.4.tar.gz.

File metadata

  • Download URL: transporthours-0.0.4.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.18

File hashes

Hashes for transporthours-0.0.4.tar.gz
Algorithm Hash digest
SHA256 56972ed2d53caba9514cc1b9c4a41ba605c290bec87d5b422d5f7b50d2e80fab
MD5 5483d411a1d90f0f57e6881541e9135c
BLAKE2b-256 677dc199f68cbbcd59d3040fa0ca1f98b794c627b77534dc0258c07d0cd8547e

See more details on using hashes here.

File details

Details for the file transporthours-0.0.4-py2-none-any.whl.

File metadata

  • Download URL: transporthours-0.0.4-py2-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.18

File hashes

Hashes for transporthours-0.0.4-py2-none-any.whl
Algorithm Hash digest
SHA256 2a8e030551be6e4223e51f13f7bdf8f8da831f52f99d8043932eb746c200cb33
MD5 cb415e4386e0c605974eda23782698d0
BLAKE2b-256 dd18a8cec722d7b11b5abbbca595da9e71a1cecbe400b0e8da25b31e7d5dda32

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