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.1.3.tar.gz
(29.9 kB
view hashes)
Built Distribution
Close
Hashes for sftpgo_client-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfe719fcec541972ee6d8576a93f40e5a784967d88ed9c685b5b0d2636eb4b06 |
|
MD5 | 46bb577c5a77d1614482b4022d6a1b21 |
|
BLAKE2b-256 | 63a7cf2fe4971c4f0b3669d6cf37c312b4c72fbc87ad54ddd4fa1d87238f6c40 |