Skip to main content

A simple python library for parsing, editing and writing GTFS files

Project description

gtfs.py

A simple python library for parsing, editing and writing GTFS files.

GTFS (General Transit Feed Specification) is a format which determined by google in order to defines a common format for public transportation static data (schedules, stops location, etc.). For more information about the format you can read here and here.

Getting Started

Installing

You can install this package with pip.

pip install gtfs.py

If you want to contribute to the library code, you have to clone if from github and install it as a developer.

git clone https://github.com/WYishai/gtfs.py.git
cd gtfs.py
cd src
python setup.py develop

Usage

All examples are intended for writing in a python shell (or python code file).

Creating a new TransitData object:

from gtfspy import TransitData

td = TransitData()
...

Loading existing GTFS file:

from gtfspy import TransitData

gtfs_file_path = "/path/to/file"
td = TransitData(gtfs_file_path)
...

Additional examples are in the examples folder in the GIT repository.

Running the tests

This project contains unit tests that covers most of the source code. In order to run the tests, you must first install the project as a developer (as mentioned at the Installing section. After the installation you can run them by typing the following commands in your shell:

cd [PROJECT_DIR]\tests
python -m unittest discover gtfspy

Of course, [PROJECT_DIR] must be replaced by the path you cloned the GIT repository into it.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

gtfs.py-0.1-py2-none-any.whl (38.2 kB view details)

Uploaded Python 2

File details

Details for the file gtfs.py-0.1-py2-none-any.whl.

File metadata

  • Download URL: gtfs.py-0.1-py2-none-any.whl
  • Upload date:
  • Size: 38.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.14

File hashes

Hashes for gtfs.py-0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 be95a38584917858307fc36d0bbf87c5a664372ea3d400c7923ca68072d388ea
MD5 66f3a91a1e3a63718a7e091e2c1a0eb5
BLAKE2b-256 d8f92ab8bb5ab0921d24fd6b7a2f0efd69aafd0b74403f9c9384e61fc2a11ad9

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