{"id":15008926,"url":"https://github.com/rehmatworks/serverpilot-python","last_synced_at":"2026-02-03T00:01:23.909Z","repository":{"id":50195442,"uuid":"180852466","full_name":"rehmatworks/serverpilot-python","owner":"rehmatworks","description":"A Python package to interact with ServerPilot API.","archived":false,"fork":false,"pushed_at":"2022-12-08T04:58:22.000Z","size":27,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-12T16:14:47.743Z","etag":null,"topics":["python","python-2","python-3","python2","python3","serverpilot","serverpilot-api"],"latest_commit_sha":null,"homepage":"https://serverpilot.io/docs/how-to-use-the-serverpilot-api","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/rehmatworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-11T18:17:43.000Z","updated_at":"2023-08-14T13:25:36.000Z","dependencies_parsed_at":"2023-01-24T13:00:45.384Z","dependency_job_id":null,"html_url":"https://github.com/rehmatworks/serverpilot-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rehmatworks/serverpilot-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehmatworks%2Fserverpilot-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehmatworks%2Fserverpilot-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehmatworks%2Fserverpilot-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehmatworks%2Fserverpilot-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rehmatworks","download_url":"https://codeload.github.com/rehmatworks/serverpilot-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehmatworks%2Fserverpilot-python/sbom","scorecard":{"id":769229,"data":{"date":"2025-08-18","repo":{"name":"github.com/rehmatworks/serverpilot-python","commit":"995a9fe4f6c0784ac2305cf89c50341ef820cdba"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: PYSEC-2023-207 / GHSA-gwvm-45gx-3cf8","Warn: Project is vulnerable to: PYSEC-2019-133 / GHSA-mh33-7rrq-662w","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2019-132 / GHSA-r64q-w8jr-g9qp","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2020-148 / GHSA-wqvq-5m8c-6g24","Warn: Project is vulnerable to: PYSEC-2021-108"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T01:46:29.268Z","repository_id":50195442,"created_at":"2025-08-23T01:46:29.268Z","updated_at":"2025-08-23T01:46:29.268Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29024557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T23:43:56.073Z","status":"ssl_error","status_checked_at":"2026-02-02T23:43:49.438Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["python","python-2","python-3","python2","python3","serverpilot","serverpilot-api"],"created_at":"2024-09-24T19:21:44.591Z","updated_at":"2026-02-03T00:01:23.891Z","avatar_url":"https://github.com/rehmatworks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python API Wrapper for ServerPilot API\nServerPilot is an awesome tool to manage Ubuntu servers in order to run PHP (and other) web apps flawlessly. This is a Python package to interact with [ServerPilot API](https://serverpilot.io/docs/how-to-use-the-serverpilot-api).\n\n## Installation\nInstall from PyPi:\n```shell\npip install rwsp\n```\nor clone this repo and run:\n```python\npython setup.py install\n```\n### Usage\n```python\nfrom serverpilot.serverpilot import ServerPilot\n# Get API Creds at https://manage.serverpilot.io/account/api\nclientId = '###############'\napiKey = '##############'\nsp = ServerPilot(clientId, apiKey)\n```\n\n## Servers\n#### List Servers\n```python\nsp.list_servers()\n```\n\n#### Get a Server\n```python\nserverId = 'ID of the server'\nsp.get_server(serverId)\n```\n\n#### Create a Server\nYou will get server ID in response that you can use manually to configure your server\n```python\ndata = {\n    'name': 'mynewserver',\n    'plan': 'business',\n    'enable_ssh_password_auth': True\n}\nsp.create_server(data)\n```\n\n#### Update a Server\n```python\ndata = {\n    'plan': 'business',\n    'firewall': True,\n    'autoupdates': True,\n    'deny_unknown_domains': True\n}\nserverId = 'ID of the server'\nsp.update_server(serverId, data)\n```\n\n#### Delete a Server\nThis action will detach your server from your ServerPilot account.\n```python\nserverId = 'ID of the server'\nsp.delete_server(serverId)\n```\n\n\n## SSH Keys\n#### List SSH Keys\n```python\nsp.list_sshkeys()\n```\n\n#### Add an SSH Key\n```python\nname = 'my_ssh_key'\npublic_key = 'public_key_data'\nsp.add_sshkey(name, public_key)\n```\n\n#### Get an SSH Key\n```python\nssh_key_id = 'your-ssh-key-id'\nsp.get_sshkey(ssh_key_id)\n```\n\n#### Rename an SSH Key\n```python\nssh_key_id = 'your-ssh-key-id'\nnew_name = 'my_updated_ssh_key'\nsp.rename_sshkey(ssh_key_id, new_name)\n```\n\n#### Delete an SSH Key\n```python\nssh_key_id = 'your-ssh-key-id'\nsp.delete_sshkey(ssh_key_id)\n```\n\n#### Assign SSH Key\nThis action assigns an SSH key to a system user.\n```python\nsys_user_id = 'system-user-id'\nssh_key_id = 'your-ssh-key-id'\nsp.assign_sshkey(ssh_key_id, sys_user_id)\n```\n\n#### Detach SSH Key\nThis action will detach an SSH key from a system user.\n```python\nsys_user_id = 'system-user-id'\nssh_key_id = 'your-ssh-key-id'\nsp.detach_sshkey(ssh_key_id, sys_user_id)\n```\n\n#### List User SSH Keys\n```python\nsys_user_id = 'system-user-id'\nsp.list_userkeys(sys_user_id)\n```\n\n## Users\n#### List Users\n```python\nsp.list_users()\n```\n\n#### Create a User\n```python\ndata = {\n    'name': 'mynewsshuser',\n    'password': 'mysecurepassword'\n}\nserverId = 'ID of the server'\nsp.create_user(serverId, data)\n```\n\n#### Get a User\n```python\nuserId = 'ID of the SSH user'\nsp.get_user(userId)\n```\n#### Update a User\nYou can update a user password.\n```python\ndata = {\n    'password': 'mynewsecurepassword'\n}\nuserId = 'ID of the SSH user'\nsp.update_user(userId, data)\n```\n\n#### Delete a User\n```python\nuserId = 'ID of the SSH user'\nsp.delete_user(userId)\n```\n\n## Apps\n#### List Apps\n```python\nsp.list_apps()\n```\n\n#### Create a New App\n```python\ndata = {\n    'sysuserid': '####', # ID of the owner (SSH User)\n    'name': 'myawesomeapp',\n    'runtime': 'php7.2',\n    'domains': ['mysite.com', 'www.mysite.com'],\n    # Provide wordpress dictionary only if you need WP to be installed in your new app\n    'wordpress': {\n        'site_title': 'My WP Site',\n        'admin_user': 'admin',\n        'admin_password': 'mysecurepassword', # Min: 8, Max: 200\n        'admin_email': 'admin@example.com'\n    }\n}\nsp.create_app(data)\n```\n\n#### Get App Details\n```python\nappId = 'ID of the app'\nsp.get_app(appId)\n```\n\n#### Update App Details\n```python\ndata = {\n    'runtime': 'php7.3',\n    'domains': ['mysite.com', 'www.mysite.com', 'newsite.com', 'www.newsite.com']\n}\nappId = 'ID of the app'\nsp.update_app(appId, data)\n```\n\n#### Enable / Install SSL\nTo enable `Auto-SSL`, don't pass the data object, just pass appId\n```python\nappId = 'ID of the app'\nsp.enable_ssl(appId) # Throws an exception if SSL is already enabled\n```\n\nIf you want to install a custom SSL, pass data with SSL assets\n```python\nappId = 'ID of the app'\ndata = {\n    'key': 'privateKey',\n    'cert': 'SSLCertContent',\n    'cacerts': 'CACertsIfApplicable' # Optional\n}\nsp.enable_ssl(appId, data) # Throws an exception if already installed\n```\n\n#### Force SSL\n```python\nappId = 'ID of the app'\nsp.force_ssl(appId) # Throws an exception if already forced\n```\n\n#### Disable SSL\nThis will uninstall / disable SSL (regardless of it is auto-ssl or custom)\n```python\nappId = 'ID of the app'\nsp.disable_ssl(appId) # Throws an exception if already disabled\n```\n\n#### Delete an App\n```python\nappId = 'ID of the app'\nsp.delete_app(appId)\n```\n\n### Databases\n#### List Databases\n```python\nsp.list_databases()\n```\n\n#### Create a Database\n```python\ndata = {\n    'appid': 'appId', # ID of the app for which you are creating the database\n    'name': 'databasename',\n    'user': {\n        'name': 'dbusername',\n        'password': 'dbpassword'\n    }\n}\nsp.create_database(data)\n```\n\n#### Get a Database\n```python\ndatabaseId = 'ID of the database'\nsp.get_database(databaseId)\n```\n\n#### Update a Database\nYou can only update the user password for a database.\n```python\ndata = {\n    'user': {\n        'password': 'newpassword'\n    }\n}\ndatabaseId = 'ID of the database'\nsp.update_database(databaseId, data)\n```\n\n#### Delete a Database\n```python\ndatabaseId = 'ID of the database'\nsp.delete_database(databaseId)\n```\n\n## Actions\nEach API call returns an action ID and you can use that ID to check the status of the concerned API call.\n```python\nactionId = 'ID of the action'\nsp.check_action(actionId)\n```\n\n## Troubleshooting\nSome of the most common errors you may encounter during utilizing this library are explained below:\n* `Exception: 401 Error: Unauthorized` is thrown when API credentials are incorrect\n* `Exception: 404 Error: Not Found` is thrown when you attempt to access a non-existent resource\n* `Exception: 400 Error: Bad Request` is thrown generally when form parameters are invalid\n\nThis package covers all API operations supported by ServerPilot. If you have any confusions on required parameters or something else, you should check the [API documentation of ServerPilot](https://github.com/ServerPilot/API).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehmatworks%2Fserverpilot-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frehmatworks%2Fserverpilot-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehmatworks%2Fserverpilot-python/lists"}