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.1.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file sftpgo-client-0.1.1.tar.gz
.
File metadata
- Download URL: sftpgo-client-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f9e9f3738a9fe191c522733ab423b6ee435e90b74585cae0df1bfb528e15038 |
|
MD5 | 8777bce73a705780910cd9fe1400a75e |
|
BLAKE2b-256 | 64e173aa8aac430281e2afbf32fef36c809692a15f69417404a8e5c24b1a0aec |
File details
Details for the file sftpgo_client-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: sftpgo_client-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00c00dfe958786e10c9b40c23043f5edaaed75d6675f202e327e951e4c3b0548 |
|
MD5 | d3d29ed3e7bd75a64e1cb9890dcb07e1 |
|
BLAKE2b-256 | a9862104c43dc71a3474a9e067017f9d9d5f129dffe48674436211e5a2262635 |