Python client for the SFTPGo API
Project description
sftpgo-client
Python client for the SFTPGo API
The sftpgo_client.base
package is automatically generated from the OpenAPI
specification provided by SFTPGo using
openapi-python-client.
Installation
pip install sftpgo-client
Examples
from sftpgo_client import Client
client = Client(
base_url="http://localhost:8080/api/v2", user="admin", password="password"
)
users = client.get_users()
for user in users:
print(user.username)
Using the asynchronous client:
import asyncio
from sftpgo_client import AsyncClient
async def print_usernames():
client = AsyncClient(
base_url="http://localhost:8080/api/v2", user="admin", password="password"
)
users = await client.get_users()
for user in users:
print(user.username)
asyncio.run(print_usernames())
Development
You can fetch the latest version of the SFTPGo OpenAPI specification and
update sftpgo_client.base
with:
./generator/run.sh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sftpgo-client-0.2.2.tar.gz
(30.0 kB
view hashes)
Built Distribution
Close
Hashes for sftpgo_client-0.2.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b0f3c3ba8728cb32497d0f42976802e769e512d1a65c153844200c24117e536 |
|
MD5 | 3096cc7ac154501743d76fa2d528d39a |
|
BLAKE2b-256 | 5778d6bb2971324c45067e43fa54846ecb0c554d94b71b5f071443630d48a196 |