Giter VIP home page Giter VIP logo

gtfs.py's Introduction

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

gtfs.py's People

Contributors

wyishai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

wialon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.