簡單存取Pterodactyl api
Reason this release was yanked:
__init__無效
Project description
pteropy
適用於Pterodactyl api的python庫
安裝
pip install pteropy
最新版本:v0.1.5
在設定時會返回布林值來確認是否成功連接
Pterodactyl_Application範例
key創建位置:/admin/api
基本設置
run.py
from pteropy import Pterodactyl_Application
#導入套件
base_url = "https://面板網址"
api_key = "api key"
#key創建位置:/admin/api
#基本設定
ptero = Pterodactyl_Application(base_url, api_key)
#傳給套件
套件範例
run.py
from pteropy import Pterodactyl_Application
base_url = "https://面板網址"
api_key = "api key"
ptero = Pterodactyl_Application(base_url, api_key)
#創建用戶
ptero.create_user(username="用戶名",email="用戶email", password="密碼")
#所有用戶
ptero.list_users()
Pterodactyl_Client範例
key創建位置:/account/api
基本設置
run.py
from pteropy import Pterodactyl_Client
#導入套件
base_url = "https://面板網址"
api_key = "api key"
#key創建位置:/account/api
#基本設定
ptero = Pterodactyl_Client(base_url, api_key)
#傳給套件
套件範例
run.py
from pteropy import Pterodactyl_Client
base_url = "https://面板網址"
api_key = "api key"
ptero = Pterodactyl_Client(base_url, api_key)
#獲得伺服器資料
ptero.get_server("3fa3d78d")
#獲得伺服器列表
ptero.list_servers()
#重命名伺服器
ptero.rename_server("3fa3d78d","名子")
#發送指令
ptero.send_command("3fa3d78d","指令")
#啟動伺服器
ptero.start_server("3fa3d78d")
#重啟伺服器
ptero.restart_server("3fa3d78d")
#關閉伺服器
ptero.stop_server("3fa3d78d")
#強制關閉伺服器
ptero.kill_server("3fa3d78d")
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
pteropy-0.1.5.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pteropy-0.1.5.tar.gz.
File metadata
- Download URL: pteropy-0.1.5.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
388882c05cbed3071e7598649661bd89c6b6ebf1d23369a8747f81c61fd15db8
|
|
| MD5 |
a60c2612de2603105468c9ae31da032d
|
|
| BLAKE2b-256 |
9443edf64de903e4d023c4fd750c8fc5771d21d21bfa2c6096dd42d2c58f9f5f
|
File details
Details for the file pteropy-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pteropy-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85463e77cf467d3fc147821d0839b5640d74d60d781d0bf7a98e6ef132c39abf
|
|
| MD5 |
21ec1cbfd260385c323f2301bf8ccd01
|
|
| BLAKE2b-256 |
d41c60bf073aa74cd2ab5d30de63712a3fe5d3abee654fba759de75f7b6fa638
|