Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adman/python-cpsk-api
An unofficial api for grabbing data from cp.sk
https://github.com/adman/python-cpsk-api
bus slovakia train transport travel
Last synced: 24 days ago
JSON representation
An unofficial api for grabbing data from cp.sk
- Host: GitHub
- URL: https://github.com/adman/python-cpsk-api
- Owner: Adman
- License: mit
- Created: 2014-10-28T19:40:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T16:02:30.000Z (3 months ago)
- Last Synced: 2024-09-30T06:14:58.789Z (about 2 months ago)
- Topics: bus, slovakia, train, transport, travel
- Language: Python
- Size: 36.1 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# python-cpsk-api ![travis](https://travis-ci.org/Adman/python-cpsk-api.svg?branch=master)
Simple python api for grabbing data from cp.sk
## Installation
Available on [pypi](https://pypi.org/project/cpsk/)
Running `$ pip install cpsk` will get the package installed
## Usage
```python
import cpsk
drive = cpsk.get_routes('Bratislava', 'Praha', **kwargs)
```### Available kwargs
| parameter | type | description |
| --------- | ------- | ---------------------------------------------------------------------------------- |
| `vehicle` | string | Vehicle to travel with. Default `vlakbus`. Available: `vlak`, `bus`, `vlakbusmhd`. |
| `time` | string | Departure time. Defaults to current time. |
| `date` | string | Departure date. Defaults to current date. |
| `direct` | boolean | Whether to look only for direct routes. Defaults to `False`. |*Beware that by using this you might be violating cp.sk ToS*