Metadata-Version: 2.1
Name: wago-api
Version: 0.0.1
Summary: An async API wrapper for wago.tools
Author-email: Ghostopheles <ghost@ghst.tools>
License: This is free and unencumbered software released into the public domain.
        
        Anyone is free to copy, modify, publish, use, compile, sell, or
        distribute this software, either in source code form or as a compiled
        binary, for any purpose, commercial or non-commercial, and by any
        means.
        
        In jurisdictions that recognize copyright laws, the author or authors
        of this software dedicate any and all copyright interest in the
        software to the public domain. We make this dedication for the benefit
        of the public at large and to the detriment of our heirs and
        successors. We intend this dedication to be an overt act of
        relinquishment in perpetuity of all present and future rights to this
        software under copyright law.
        
        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 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.
        
        For more information, please refer to <https://unlicense.org>
        
Project-URL: Homepage, https://github.com/Ghostopheles/py-wago-api
Project-URL: Repository, https://github.com/Ghostopheles/py-wago-api.git
Project-URL: Issues, https://github.com/Ghostopheles/py-wago-api/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Public Domain
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx[http2]

# py-wago-api
An asynchronous Python wrapper for the [wago.tools](https://wago.tools) API

## Install

```
pip install git+https://github.com/Ghostopheles/py-wago-api.git
```

## Usage

All responses are converted from their usual JSON format into Python objects.

```py
from wago import WagoAPI

async def main():
    client = WagoAPI()

    fdid = 6420120
    file = await client.get_file_by_fdid(fdid)
```

#### Methods

##### Builds
- `WagoAPI.get_all_builds()`: Returns all builds that have been processed by wago.tools
- `WagoAPI.get_latest_build(product)`: Returns the latest build for the specified product
- `WagoAPI.get_latest_build_for_all_products()`: Returns the latest build for all products

##### Files
- `WagoAPI.get_file_by_fdid(fdid)`: Returns the contents of a CASC file by FileDataID
    - Optionally, provide a version to grab the file for the specified build (i.e. "11.0.7.58187")
- `WagoAPI.get_file_info_by_fdid(fdid)`: Returns metadata about a given CASC file by FileDataID
- `WagoAPI.get_all_files()`: Returns all available files in the specified format, or json by default
    - Optionally, specify a version and format
