SNCF Api
A class of methods that can call the different SNCF API's from SNCF Open Data, returns data as a Pandas dataframe or .json() object.
That Pandas dataframe has some elements clipped.
Some of the calls can be huge, as SNCF has put a lot of data up. Some calls may even max out the api interface. list line by type is an example.
Requirements
- Pandas
- Requests
- Python 3.8
Installation
Use the package manager pip to install.
pip install sncf-api
Usage
Import the class.
import sncf_api as sncf
Call the class (with or without the line code).
sncf = sncf(903000)
Or
sncf = sncf()
Call methods.
db = sncf.list_construction_site()
To get a list of methods from class.
help(sncf)
Notes
Methods don't need to be called with arguments, only the class. The convert_to_pandas_db() method with used the data from the last method called and return a pandas dataframe.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
URL's
Release files for sncf-api 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sncf_api-0.1.1.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sncf_api-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / sncf_api-0.1.1.tar.gz
| Download URL | sncf_api-0.1.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e36ee1b0e62a51397196747a2b36da63e01df295ff2a50205619ed26279f2a4
|
|
BLAKE2b-256 checksum How to use checksums |
ae4f8f40ed355e93c996cd5407f475c9e27d6a98b7f8a937c6bfba962c731c02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.2 Windows/10
|
Release files / sncf_api-0.1.1-py3-none-any.whl
| Download URL | sncf_api-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2a34ce8e98e7d07f01769343ddb911b6fe6d6cd092ce6aadc89b89cb2171894
|
|
BLAKE2b-256 checksum How to use checksums |
f683485c8f704f45ceaa1ec4a6c41e64ee2e829db9b5677259e9a3f3f0e7cad5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.2 Windows/10
|