Metadata-Version: 2.4
Name: wg-easy-api-wrapper
Version: 1.0.9
Summary: Wrapper for wg-easy API
Home-page: https://github.com/Shandeika/wg-easy-api-wrapper
Author: MrShandy
Author-email: mrshandy@shandy-dev.ru
License: GPL-3.0
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp~=3.9.0
Dynamic: license-file

# wg-easy-api-wrapper
Python module for convenient interaction with the application API [wg-easy](https://github.com/wg-easy/wg-easy)

You can see all the methods in the documentation on [GitHub Pages](https://shandeika.github.io/wg-easy-api-wrapper/)

## Usage
A quick example of creating a client:
```python
import asyncio

from wg_easy_api_wrapper import Server


async def main():
    async with Server("http://wg.example.com:51821", "SuPerSecret_pass") as server:
        await server.create_client("client_name")


asyncio.run(main())
```
Or a slightly more complicated way:
```python
import asyncio

import aiohttp

from wg_easy_api_wrapper import Server


async def main():
    async with aiohttp.ClientSession() as session:
        server = Server("http://wg.example.com:51821", "SuPerSecret_pass", session)
        await server.login()
        await server.create_client("client_name")


asyncio.run(main())
```
