Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jktujg/aero-svo-api
https://github.com/jktujg/aero-svo-api
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jktujg/aero-svo-api
- Owner: jktujg
- License: mit
- Created: 2024-03-11T11:12:50.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-13T09:27:53.000Z (10 months ago)
- Last Synced: 2024-04-12T20:48:55.093Z (9 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aero-svo-api
Unofficial Sheremetyevo International Airport [website](https://www.svo.aero/ru/main) API wrapper* Sync/Async usage
* Pydantic models as a result## Installation
```commandline
pip install aero-svo-api
```
## Available methods
* `get_schedule` - List of flights for arrival/departure direction in a time range
* `get_flight` - Current flight details by its ID## Usage example
```python
from datetime import datetime, timedelta
from aero_svo_api import SvoAPI# each *API instance creates own session with first request if session not provided in constructor
# by default: request.Session for SvoAPI and aiohttp.ClientSession for AsyncSvoAPIsvo_api = SvoAPI()
schedule = svo_api.get_schedule(
direction='departure',
date_start=datetime.now(),
date_end=datetime.now() + timedelta(hours=3),
# additional parameters (e.g. headers, cookies, ...) forwards to session request
headers={'User-Agent': 'Custom user-agent'}
)
```