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.2.tar.gz
(30.0 kB
view hashes)
Built Distribution
Close
Hashes for sftpgo_client-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb43accc7d97ae552561de08b97b33dbf4492369057dfe3087a111ececb635dc |
|
MD5 | 3cc34ec6dade4b261268ac4a1d344a60 |
|
BLAKE2b-256 | 7ef53708b3f9bcde0f48eb0d152361250ae864c9f4f0c4f18974e1c2290f1111 |