Skip to content
/ gtfs.py Public
forked from WYishai/gtfs.py

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

License

Notifications You must be signed in to change notification settings

wialon/gtfs.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

gtfs.py

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

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 following command:

pip install git+https://github.com/wialon/gtfs.py@master#subdirectory=src

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

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.

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%