weglide-client


Nameweglide-client JSON
Version 0.1.5 PyPI version JSON
download
home_pageNone
SummaryPython client 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.
upload_time2025-03-28 12:35:48
maintainerNone
docs_urlNone
authorOpenAPI Generator community
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WeGlide Python Client

A Python client library for the [WeGlide](https://weglide.org) 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.

[![PyPI version](https://img.shields.io/pypi/v/weglide-client.svg)](https://pypi.org/project/weglide-client/)
[![Python Versions](https://img.shields.io/pypi/pyversions/weglide-client.svg)](https://pypi.org/project/weglide-client/)
[![License](https://img.shields.io/github/license/develmusa/weglide-python-client.svg)](https://github.com/develmusa/weglide-python-client/blob/main/LICENSE)

This package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) 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

```bash
pip install weglide-client
```

### For Development

Clone the repository and install in development mode:

```bash
git clone https://github.com/develmusa/weglide-python-client.git
cd weglide-python-client
pip install -e .
pip install --group dev .
```

Or using `uv`:

```bash
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

```python
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:

```python
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:

```python
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](https://docs.weglide.org/creators/developers.html).

## Examples

### Fetching Flights

```python
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

```python
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:

```bash
python -m unittest discover -s test
```

Or using tox to test across multiple Python versions:

```bash
tox
```

## License

This project is licensed under the [MIT License](./LICENSE).

## Links

- [PyPI Package](https://pypi.org/project/weglide-client/)
- [GitHub Repository](https://github.com/develmusa/weglide-python-client)
- [WeGlide Website](https://weglide.org)
- [WeGlide API Documentation](https://docs.weglide.org/creators/developers.html)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "weglide-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "OpenAPI Generator community",
    "author_email": "OpenAPI Generator Community <team@openapitools.org>",
    "download_url": "https://files.pythonhosted.org/packages/e1/c6/d1e6f939e494163e99fb22ceb9a6bbb97e5bea55badea7ce7ec8382cd3d6/weglide_client-0.1.5.tar.gz",
    "platform": null,
    "description": "# WeGlide Python Client\n\nA Python client library for the [WeGlide](https://weglide.org) 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.\n\n[![PyPI version](https://img.shields.io/pypi/v/weglide-client.svg)](https://pypi.org/project/weglide-client/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/weglide-client.svg)](https://pypi.org/project/weglide-client/)\n[![License](https://img.shields.io/github/license/develmusa/weglide-python-client.svg)](https://github.com/develmusa/weglide-python-client/blob/main/LICENSE)\n\nThis package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 0.1.0\n- Package version: 0.1.5\n- Generator version: 7.12.0\n\n## Requirements\n\n- Python 3.9+\n- Dependencies:\n  - urllib3 >= 1.25.3, < 3.0.0\n  - python-dateutil >= 2.8.2\n  - typing-extensions >= 4.7.1\n  - pydantic >= 2.10.6\n\n## Installation\n\n### From PyPI\n\n```bash\npip install weglide-client\n```\n\n### For Development\n\nClone the repository and install in development mode:\n\n```bash\ngit clone https://github.com/develmusa/weglide-python-client.git\ncd weglide-python-client\npip install -e .\npip install --group dev .\n```\n\nOr using `uv`:\n\n```bash\ngit clone https://github.com/develmusa/weglide-python-client.git\ncd weglide-python-client\nuv venv\nuv pip install -e .\nuv pip install --group dev .\n```\n\n## Getting Started\n\n### Basic Usage\n\n```python\nimport weglide_client\nfrom weglide_client.rest import ApiException\nfrom pprint import pprint\n\n# Configure the API client\n# The host defaults to https://api.weglide.org if not specified\nconfiguration = weglide_client.Configuration(\n    host=\"https://api.weglide.org\"\n)\n\n# Create an API client instance\nwith weglide_client.ApiClient(configuration) as api_client:\n    # Create an instance of an API class\n    airport_api = weglide_client.AirportApi(api_client)\n    \n    try:\n        # Get information about a specific airport\n        airport_id = 161522  # Example airport ID\n        api_response = airport_api.get_airport_v1_airport_id_get(id=airport_id)\n        print(\"Airport information:\")\n        pprint(api_response)\n    except ApiException as e:\n        print(f\"Exception when calling AirportApi: {e}\")\n```\n\n### Authentication\n\nFor endpoints that require authentication, you'll need to provide an API token:\n\n```python\nimport weglide_client\nfrom weglide_client.rest import ApiException\n\n# Configure API key authorization\nconfiguration = weglide_client.Configuration(\n    host=\"https://api.weglide.org\",\n    api_key={\"Authorization\": \"YOUR_API_KEY\"},\n    api_key_prefix={\"Authorization\": \"Bearer\"}\n)\n\n# Use the authenticated client\nwith weglide_client.ApiClient(configuration) as api_client:\n    # Access protected endpoints\n    flight_api = weglide_client.FlightApi(api_client)\n    # ...\n```\n\n### Environment Variables\n\nYou can also configure the client using environment variables:\n\n```python\nimport os\nimport weglide_client\n\n# Set environment variables\nos.environ[\"WEGLIDE_API_URL\"] = \"https://api.weglide.org\"\nos.environ[\"WEGLIDE_API_KEY\"] = \"YOUR_API_KEY\"\n\n# Configure using environment variables\nconfiguration = weglide_client.Configuration()\nconfiguration.host = os.environ.get(\"WEGLIDE_API_URL\", \"https://api.weglide.org\")\nif \"WEGLIDE_API_KEY\" in os.environ:\n    configuration.api_key = {\"Authorization\": os.environ[\"WEGLIDE_API_KEY\"]}\n    configuration.api_key_prefix = {\"Authorization\": \"Bearer\"}\n```\n\n## Available API Endpoints\n\nThe client provides access to the following WeGlide API endpoints:\n\n- **Achievement API**: Access user achievements\n- **Aircraft API**: Manage aircraft information\n- **Airport API**: Access airport data\n- **Auth API**: Handle authentication\n- **Badge API**: Access badge information\n- **Club API**: Manage club data\n- **Comment API**: Handle flight comments\n- **Competition API**: Access competition data\n- **Flight API**: Manage flight data and uploads\n- **User API**: Manage user profiles\n- **Waypoint API**: Access waypoint information\n\nFor detailed API documentation, visit the [WeGlide API Documentation](https://docs.weglide.org/creators/developers.html).\n\n## Examples\n\n### Fetching Flights\n\n```python\nimport weglide_client\nfrom weglide_client.rest import ApiException\n\nconfiguration = weglide_client.Configuration()\nwith weglide_client.ApiClient(configuration) as api_client:\n    flight_api = weglide_client.FlightApi(api_client)\n    \n    try:\n        # Get recent flights\n        flights = flight_api.get_flights_v1_flight_get(limit=10)\n        for flight in flights:\n            print(f\"Flight ID: {flight.id}, Pilot: {flight.user.name}, Date: {flight.date}\")\n    except ApiException as e:\n        print(f\"Exception when calling FlightApi: {e}\")\n```\n\n### Working with Airports\n\n```python\nimport weglide_client\nfrom weglide_client.rest import ApiException\n\nconfiguration = weglide_client.Configuration()\nwith weglide_client.ApiClient(configuration) as api_client:\n    airport_api = weglide_client.AirportApi(api_client)\n    \n    try:\n        # Search for airports\n        airports = airport_api.search_airports_v1_airport_search_get(\n            query=\"Munich\",\n            limit=5\n        )\n        for airport in airports:\n            print(f\"Airport: {airport.name}, ICAO: {airport.icao}, Elevation: {airport.elevation}m\")\n    except ApiException as e:\n        print(f\"Exception when calling AirportApi: {e}\")\n```\n\n## Testing\n\nRun the tests using unittest:\n\n```bash\npython -m unittest discover -s test\n```\n\nOr using tox to test across multiple Python versions:\n\n```bash\ntox\n```\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n\n## Links\n\n- [PyPI Package](https://pypi.org/project/weglide-client/)\n- [GitHub Repository](https://github.com/develmusa/weglide-python-client)\n- [WeGlide Website](https://weglide.org)\n- [WeGlide API Documentation](https://docs.weglide.org/creators/developers.html)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python client 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.",
    "version": "0.1.5",
    "project_urls": {
        "Documentation": "https://docs.weglide.org/creators/developers.html",
        "Homepage": "https://github.com/develmusa/weglide-python-client",
        "Issues": "https://github.com/develmusa/weglide-python-client/issues",
        "WeGlide": "https://weglide.org"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e1ca964744af99d1b550b4d1e14bb1f4e3203cb5be756a211dde3db17de5a933",
                "md5": "c524b3be79d055cc101dc862ff49bfae",
                "sha256": "7b01694ed33607cf81d62ab6a57413d056ebaf8fe25ad4d95e0f976d133af9f2"
            },
            "downloads": -1,
            "filename": "weglide_client-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c524b3be79d055cc101dc862ff49bfae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 282717,
            "upload_time": "2025-03-28T12:35:46",
            "upload_time_iso_8601": "2025-03-28T12:35:46.349837Z",
            "url": "https://files.pythonhosted.org/packages/e1/ca/964744af99d1b550b4d1e14bb1f4e3203cb5be756a211dde3db17de5a933/weglide_client-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e1c6d1e6f939e494163e99fb22ceb9a6bbb97e5bea55badea7ce7ec8382cd3d6",
                "md5": "e5fb36339d495f136d04bd566b701144",
                "sha256": "829cedfa2cf2ae6809f1bb36b7d71bf9e7d0412f12ca4dd63d42e6c69bb6b386"
            },
            "downloads": -1,
            "filename": "weglide_client-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "e5fb36339d495f136d04bd566b701144",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 131325,
            "upload_time": "2025-03-28T12:35:48",
            "upload_time_iso_8601": "2025-03-28T12:35:48.081208Z",
            "url": "https://files.pythonhosted.org/packages/e1/c6/d1e6f939e494163e99fb22ceb9a6bbb97e5bea55badea7ce7ec8382cd3d6/weglide_client-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-03-28 12:35:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "develmusa",
    "github_project": "weglide-python-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "weglide-client"
}
        
Elapsed time: 0.88141s