Skip to main content

BWH

搬瓦工面板 API SDK

安装

使用pip安装

$ pip install turbotools

或者从源码包安装

$ git clone https://github.com/anshengme/turbotools
$ cd turbotools
$ python setup.py install

示例

  • 创建实例
>>> from bwh import BwhSdk
>>> bwh = BwhSdk(veid=598375,api_key='private_YJuvhyLXL5RwLJ2q9pVxlqi9')
  • 获取服务器信息
>>> bwh.get_service_info()
  • 获取可以安装的OS列表
>>> bwh.get_available_os()
{'error': 0, 'installed': 'centos-6-x86-bbr', 'templates': ['centos-6-x86', 'centos-6-x86-bbr', 'centos-6-x86_64', 'centos-6-x86_64-bbr', 'centos-7-x86_64', 'centos-7-x86_64-bbr', 'debian-7-x86', 'debian-7-x86_64', 'debian-8-x86', 'debian-8-x86_64', 'debian-9-x86', 'debian-9-x86_64', 'ubuntu-12.04-x86', 'ubuntu-12.04-x86_64', 'ubuntu-14.04-x86', 'ubuntu-14.04-x86_64', 'ubuntu-16.04-x86', 'ubuntu-16.04-x86_64', 'ubuntu-18.04-x86_64']}

Metadata

Release files for bwh 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bwh 0.0.1
File Size Uploaded Provenance Actions
bwh-0.0.1.tar.gz 3.9 kB Without provenance Details for bwh-0.0.1.tar.gz

Release files / bwh-0.0.1.tar.gz

Download URL bwh-0.0.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
eab1a14f8fc6be42fdbeb725379ffbcec4e0646594e9f532e7346d54a4ea18b6
BLAKE2b-256 checksum
How to use checksums
f591b99b27acd6c9e5ad1c3766accb67dd354f1c1c7acdfa739237bc6ab06994
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Security for bwh 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page