WeGlide Python Client
A Python client library for the WeGlide API. WeGlide is an online platform where glider pilots can share and analyze their flights, participate in competitions, and connect with the global gliding community.
This package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Package version: 0.1.5
- Generator version: 7.12.0
Requirements
- Python 3.9+
- Dependencies:
- urllib3 >= 1.25.3, < 3.0.0
- python-dateutil >= 2.8.2
- typing-extensions >= 4.7.1
- pydantic >= 2.10.6
Installation
From PyPI
pip install weglide-client
For Development
Clone the repository and install in development mode:
git clone https://github.com/develmusa/weglide-python-client.git
cd weglide-python-client
pip install -e .
pip install --group dev .
Or using uv:
git clone https://github.com/develmusa/weglide-python-client.git
cd weglide-python-client
uv venv
uv pip install -e .
uv pip install --group dev .
Getting Started
Basic Usage
import weglide_client
from weglide_client.rest import ApiException
from pprint import pprint
# Configure the API client
# The host defaults to https://api.weglide.org if not specified
configuration = weglide_client.Configuration(
host="https://api.weglide.org"
)
# Create an API client instance
with weglide_client.ApiClient(configuration) as api_client:
# Create an instance of an API class
airport_api = weglide_client.AirportApi(api_client)
try:
# Get information about a specific airport
airport_id = 161522 # Example airport ID
api_response = airport_api.get_airport_v1_airport_id_get(id=airport_id)
print("Airport information:")
pprint(api_response)
except ApiException as e:
print(f"Exception when calling AirportApi: {e}")
Authentication
For endpoints that require authentication, you'll need to provide an API token:
import weglide_client
from weglide_client.rest import ApiException
# Configure API key authorization
configuration = weglide_client.Configuration(
host="https://api.weglide.org",
api_key={"Authorization": "YOUR_API_KEY"},
api_key_prefix={"Authorization": "Bearer"}
)
# Use the authenticated client
with weglide_client.ApiClient(configuration) as api_client:
# Access protected endpoints
flight_api = weglide_client.FlightApi(api_client)
# ...
Environment Variables
You can also configure the client using environment variables:
import os
import weglide_client
# Set environment variables
os.environ["WEGLIDE_API_URL"] = "https://api.weglide.org"
os.environ["WEGLIDE_API_KEY"] = "YOUR_API_KEY"
# Configure using environment variables
configuration = weglide_client.Configuration()
configuration.host = os.environ.get("WEGLIDE_API_URL", "https://api.weglide.org")
if "WEGLIDE_API_KEY" in os.environ:
configuration.api_key = {"Authorization": os.environ["WEGLIDE_API_KEY"]}
configuration.api_key_prefix = {"Authorization": "Bearer"}
Available API Endpoints
The client provides access to the following WeGlide API endpoints:
- Achievement API: Access user achievements
- Aircraft API: Manage aircraft information
- Airport API: Access airport data
- Auth API: Handle authentication
- Badge API: Access badge information
- Club API: Manage club data
- Comment API: Handle flight comments
- Competition API: Access competition data
- Flight API: Manage flight data and uploads
- User API: Manage user profiles
- Waypoint API: Access waypoint information
For detailed API documentation, visit the WeGlide API Documentation.
Examples
Fetching Flights
import weglide_client
from weglide_client.rest import ApiException
configuration = weglide_client.Configuration()
with weglide_client.ApiClient(configuration) as api_client:
flight_api = weglide_client.FlightApi(api_client)
try:
# Get recent flights
flights = flight_api.get_flights_v1_flight_get(limit=10)
for flight in flights:
print(f"Flight ID: {flight.id}, Pilot: {flight.user.name}, Date: {flight.date}")
except ApiException as e:
print(f"Exception when calling FlightApi: {e}")
Working with Airports
import weglide_client
from weglide_client.rest import ApiException
configuration = weglide_client.Configuration()
with weglide_client.ApiClient(configuration) as api_client:
airport_api = weglide_client.AirportApi(api_client)
try:
# Search for airports
airports = airport_api.search_airports_v1_airport_search_get(
query="Munich",
limit=5
)
for airport in airports:
print(f"Airport: {airport.name}, ICAO: {airport.icao}, Elevation: {airport.elevation}m")
except ApiException as e:
print(f"Exception when calling AirportApi: {e}")
Testing
Run the tests using unittest:
python -m unittest discover -s test
Or using tox to test across multiple Python versions:
tox
License
This project is licensed under the MIT License.
Links
Metadata
Release files for weglide-client 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| weglide_client-0.1.5.tar.gz | 131.3 kB | With provenance | Details for weglide_client-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| weglide_client-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for weglide_client-0.1.5-py3-none-any.whl |
Total release size: 414.0 kB
Release files / weglide_client-0.1.5.tar.gz
| Download URL | weglide_client-0.1.5.tar.gz |
|---|---|
| Size | 131.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
829cedfa2cf2ae6809f1bb36b7d71bf9e7d0412f12ca4dd63d42e6c69bb6b386
|
|
BLAKE2b-256 checksum How to use checksums |
e1c6d1e6f939e494163e99fb22ceb9a6bbb97e5bea55badea7ce7ec8382cd3d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 28, 2025.
Transparency logRelease files / weglide_client-0.1.5-py3-none-any.whl
| Download URL | weglide_client-0.1.5-py3-none-any.whl |
|---|---|
| Size | 282.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b01694ed33607cf81d62ab6a57413d056ebaf8fe25ad4d95e0f976d133af9f2
|
|
BLAKE2b-256 checksum How to use checksums |
e1ca964744af99d1b550b4d1e14bb1f4e3203cb5be756a211dde3db17de5a933
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 28, 2025.
Transparency logSecurity for weglide-client 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for weglide_client-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 28, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.