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
- Creating a client:
from sftpgo_client import Client
client = Client(
base_url="http://localhost:8080/api/v2", user="admin", password="password"
)
In an asyncio environment, use the asynchronous client instead:
from sftpgo_client import AsyncClient
client = AsyncClient(
base_url="http://localhost:8080/api/v2", user="admin", password="password"
)
- Listing users:
users = client.get_users()
for user in users:
print(user.username)
or with the asynchronous client:
users = await client.get_users()
for user in users:
print(user.username)
All API endpoints are available in both the synchronous and asynchronous clients.
- Adding a new user:
from sftpgo_client import User
user = User.from_dict(
{
"username": "user",
"password": "password",
"permissions": {"/": ["*"]},
}
)
client.add_user(json_body=user)
Development
You can fetch the latest version of the SFTPGo OpenAPI specification and
update sftpgo_client.base with:
./generator/run.sh
You can run the tests with:
docker-compose up -d
pytest
Metadata
Release files for sftpgo-client 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sftpgo-client-0.3.1.tar.gz | 80.5 kB | Without provenance | Details for sftpgo-client-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sftpgo_client-0.3.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for sftpgo_client-0.3.1-py2.py3-none-any.whl |
Total release size: 317.7 kB
Release files / sftpgo-client-0.3.1.tar.gz
| Download URL | sftpgo-client-0.3.1.tar.gz |
|---|---|
| Size | 80.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5208329457aab555311bc070d913ac4e082163b319f93f9856836774f504c2ff
|
|
BLAKE2b-256 checksum How to use checksums |
c4e8ac6478af909ae38a54aca5f5152c1a4bd6e7f100d0edbb228c6c60c1a0a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / sftpgo_client-0.3.1-py2.py3-none-any.whl
| Download URL | sftpgo_client-0.3.1-py2.py3-none-any.whl |
|---|---|
| Size | 237.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d74194bfd87ec5c246aedf327770b48110d5e4194d1b99fd29b5eab1c70ff3f0
|
|
BLAKE2b-256 checksum How to use checksums |
83d3f86740708b6df84a375771be6499d5a5f186e4ccff9466e59fbb28cccc18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for sftpgo-client 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.