Python client for the RailwagonLocation API.
Project description
RailwagonLocation
Python client for the RailwagonLocation API.
Installation
pip install railwagonlocation
Usage
from railwagonlocation import RailWagonLocation
# Create client
# username - username for RailwagonLocation API
# password - password for RailwagonLocation API
# base_url - base url for RailwagonLocation API
# return_format - json or xml, default json
client = RailWagonLocation('username', 'password', 'base_url',return_format='json',)
# Get wagon info
wagons = client.get_wagon_info('12345678')
# Get wagon repair s history
history = client.get_wagon_repair_history('12345678')
# Get vagon info with history
wagon_history = client.get_wagon_history('12345678',days_limit=30)
# Get all wagon info
# all_operations - get all operations for wagon
# added_last_minutes - get wagons added in last minutes without calendar_date
# calendar_date - get wagons added in calendar_date, added_last_minutes not work with calendar_date
wagons = client.get_all_wagons_info(all_operations=True, added_last_minutes=60, calendar_date="2021-01-01")
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License (see the LICENSE file for details).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file RailWagonLocation-1.0.0.tar.gz
.
File metadata
- Download URL: RailWagonLocation-1.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b6d14feea364a3142fea75e07457056fb7fe08b65afc735a1ffe38c19bcda3a |
|
MD5 | 3d9077f67c989bfb4fb2428a95b23781 |
|
BLAKE2b-256 | ef862a2fc58c7c8e3abad528e55352c54697095a3b2d3946cf3eae0bbd7a628c |