{"id":16668386,"url":"https://github.com/ramnes/sftpgo-client","last_synced_at":"2025-03-21T17:32:30.469Z","repository":{"id":46299540,"uuid":"350450149","full_name":"ramnes/sftpgo-client","owner":"ramnes","description":"Python client (sync + async) for the SFTPGo API","archived":false,"fork":false,"pushed_at":"2022-12-18T14:39:31.000Z","size":345,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T15:38:00.420Z","etag":null,"topics":["async","ftp","python","python-client","sftp","sftpgo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ramnes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://paypal.me/ramnes"]}},"created_at":"2021-03-22T18:33:45.000Z","updated_at":"2024-06-08T18:42:37.000Z","dependencies_parsed_at":"2023-01-29T19:30:32.810Z","dependency_job_id":null,"html_url":"https://github.com/ramnes/sftpgo-client","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramnes%2Fsftpgo-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramnes%2Fsftpgo-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramnes%2Fsftpgo-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramnes%2Fsftpgo-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramnes","download_url":"https://codeload.github.com/ramnes/sftpgo-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244838668,"owners_count":20518863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","ftp","python","python-client","sftp","sftpgo"],"created_at":"2024-10-12T11:24:52.149Z","updated_at":"2025-03-21T17:32:29.987Z","avatar_url":"https://github.com/ramnes.png","language":"Python","funding_links":["https://paypal.me/ramnes"],"categories":[],"sub_categories":[],"readme":"[SFTPGo]: https://github.com/drakkan/sftpgo\n\nsftpgo-client\n=============\n\n[![PyPI](https://img.shields.io/pypi/v/sftpgo-client.svg)](https://pypi.org/project/sftpgo-client)\n[![License](https://img.shields.io/github/license/ramnes/sftpgo-client)](LICENSE)\n[![Code style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/ambv/black)\n\nPython client for the [SFTPGo][] API\n\nThe `sftpgo_client.base` package is automatically generated from the [OpenAPI\nspecification](generator/openapi.yaml) provided by [SFTPGo][] using\n[openapi-python-client](https://github.com/triaxtec/openapi-python-client).\n\nInstallation\n------------\n\n```\npip install sftpgo-client\n```\n\nExamples\n--------\n\n* Creating a client:\n\n```python\nfrom sftpgo_client import Client\n\nclient = Client(\n    base_url=\"http://localhost:8080/api/v2\", user=\"admin\", password=\"password\"\n)\n```\n\nIn an asyncio environment, use the asynchronous client instead:\n\n```python\nfrom sftpgo_client import AsyncClient\n\nclient = AsyncClient(\n    base_url=\"http://localhost:8080/api/v2\", user=\"admin\", password=\"password\"\n)\n```\n\n* Listing users:\n\n```python\nusers = client.get_users()\nfor user in users:\n    print(user.username)\n```\n\nor with the asynchronous client:\n\n```python\nusers = await client.get_users()\nfor user in users:\n    print(user.username)\n```\n\nAll API endpoints are available in both the synchronous and asynchronous clients.\n\n* Adding a new user:\n\n```python\nfrom sftpgo_client import User\n\nuser = User.from_dict(\n    {\n        \"username\": \"user\",\n        \"password\": \"password\",\n        \"permissions\": {\"/\": [\"*\"]},\n    }\n)\nclient.add_user(json_body=user)\n```\n\nDevelopment\n-----------\n\nYou can fetch the latest version of the [SFTPGo][] OpenAPI specification and\nupdate `sftpgo_client.base` with:\n\n```\n./generator/run.sh\n```\n\nYou can run the tests with:\n\n```\npip install -r requirements.txt\ndocker-compose up -d\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framnes%2Fsftpgo-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framnes%2Fsftpgo-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framnes%2Fsftpgo-client/lists"}