Metadata-Version: 2.3
Name: realtime-trains-py
Version: 1.1.1b1
Summary: Python Package for the RealTime Trains API.
Project-URL: Repository, https://github.com/anonymous44401/realtime-trains-py
Project-URL: Issues, https://github.com/anonymous44401/realtime-trains-py/issues
Project-URL: Discord, https://discord.gg/8xcXSGhBAR
Author-email: anonymous44401 <anonymous4401.ad@gmail.com>
License: MIT License
        
        
        
        Copyright (c) [2024] [anonymous44401]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# RealTime Trains API Python Module

Maintained by [@anonymous44401](https://github.com/anonymous44401)

![PyPI](https://img.shields.io/pypi/v/realtime-trains-py) ![License](https://img.shields.io/github/license/anonymous44401/realtime-trains-py) ![Issues](https://img.shields.io/github/issues/anonymous44401/realtime-trains-py)


### View our [latest release](https://github.com/anonymous44401/realtime-trains-py/releases)

[Documentation](https://github.com/anonymous44401/realtime-trains-py/wiki/Home)

## About this package

**realtime-trains-py** is a python package designed to allow you to access data directly from the Realtime Trains API, in a simple and user-friendly way. The package includes 5 different complexity modes that allow you to customise the data you want to see.

This package can be used for anything railway related, whether you're a rail enthusiast or commuter, this package can be used for all your purposes. The package can be used in personal applications or for personal rail data access. 

## What can I do with this package?
This package allows you to access data directly from the Realtime Trains API using one of 5 complexities. Each complexity mode gives you access to different data the API offers. 

For the most freedom with the API, you can use **complex** mode. Complex mode lets you access all the data available from the Realtime Trains API. This mode does not format any data for you - it creates new .json files with the data you requested. This mode is recommended for those who have a good understanding of python and managing json files.

For a mix of freedom and flexibility, you can use **advanced** mode. Advanced mode allows you to access most the data available from the Realtime Trains API, but it comes with a time constraint. You can't request data more than 7 days prior to the current date nor 80 days after the current date. 


Using advanced and simple mode, you can optionally select between prettier or normal mode. Prettier mode gives you your data in a nicely formatted table, while normal mode gives you your data as a list of objects, so you'll need to get the data out of the objects yourself. Don't worry though, we have plenty of [documentation](https://github.com/anonymous44401/realtime-trains-py/wiki/Home) to help you out! 


## Installation Instructions

To install the package, simply run the following command in your terminal:
```
$ pip install realtime-trains-py
``` 
Alternatively, you can clone, fork or download the [repository](https://github.com/anonymous44401/realtime-trains-py) onto your device. 

Once installed, you can import the package. Place the lines below in your file, or you can run them directly in your terminal.
```python
from realtime_trains_py import RealtimeTrainsPy

rtt = RealtimeTrainsPy(username = "your_username", password = "your_password", complexity = "c")
```

Check out the [documentation](https://github.com/anonymous44401/realtime-trains-py/wiki/Home) for more help setting up.

> [!IMPORTANT]
> You need an RTT API account to access this package. You can sign up for free at the [API home page](https://api.rtt.io). 


## Examples of this package

The example below will return you up to 15 rows on the departure board for London King's Cross at the time you run the program. 
```python
rtt.get_departures_board(tiploc = "KNGX", rows = 15)
```

The example below will return you up to 15 rows on the arrivals board for London King's Cross at the time you run the program. 
```python
rtt.get_arrivals_board(tiploc = "KNGX", rows = 15)
```

More in-depth examples can be found on our [GitHub wiki](https://github.com/anonymous44401/realtime-trains-py/wiki/Home). 


## License

The **realtime-trains-py** API Wrapper uses an MIT License.