python-flops
Python-flops is python lib to access flops.ru API
###Requirements * Python (2.7, 3.4+) * requests
Usage
Installation.
pip install flops
Credentials.
from flops import FlopsClient
flops_client = FlopsClient(client_id='client_id', api_key='api_key')
tariffs = flops_client.get_tariffs()
FlopsClient methods.
add_pubkey(self, name, public_key, tenant_id)
add_vm_ip(self, vm_id, tenant_id)
change_vm_backup_policy(self, vm_id, quantity, frequency, tenant_id)
change_vm_cpu(self, vm_id, cpu, tenant_id)
change_vm_disk(self, vm_id, disk, allow_restart, tenant_id, allow_memory_change)
change_vm_memory(self, vm_id, memory, allow_restart, tenant_id)
change_vm_password(self, vm_id, password, send_password, tenant_id)
change_vm_pubkeys(self, vm_id, key_ids, tenant_id)
clone_vm(self, vm_id, name, tenant_id, snapshot_id)
create_vm_snapshot(self, vm_id, name, description, tenant_id)
delete_pubkey(self, key_id, tenant_id)
delete_vm(self, vm_id, tenant_id)
delete_vm_ip(self, vm_id, ip, tenant_id)
delete_vm_snapshot(self, vm_id, snapshot_id, delete_children, tenant_id)
edit_pubkey(self, key_id, tenant_id, name, public_key)
get_distributions(self,)
get_distributions_by_name(self, name, match_type)
get_operation_status(self, operation_id)
get_pubkey(self, key_id)
get_pubkeys(self,)
get_pubkeys_by_name(self, name, match_type)
get_software(self,)
get_tariffs(self, for_windows, order_by, on_demand)
get_tenants(self,)
get_vm(self, vm_id)
get_vm_backups(self, vm_id)
get_vm_snapshots(self, vm_id)
get_vms(self,)
get_vms_by_name(self, name, match_type)
install_vm(self, name, distribution_id, tariff_id, tenant_id, memory, disk, cpu, ip_count, password, send_password, open_support_access, public_key_ids, software_ids)
move_vm_ip(self, vm_id, to_vm_id, ip, tenant_id)
poweroff_vm(self, vm_id, tenant_id)
reboot_vm(self, vm_id, tenant_id)
reinstall_vm(self, vm_id, name, distribution_id, tariff_id, tenant_id, memory, disk, cpu, password, send_password, open_support_access, public_key_ids, software_ids)
rename_vm(self, vm_id, new_name, tenant_id)
reset_vm(self, vm_id, tenant_id)
rollback_vm_backup(self, vm_id, backup, create_backup, tenant_id)
rollback_vm_snapshot(self, vm_id, snapshot_id, tenant_id)
shutdown_vm(self, vm_id, tenant_id)
start_vm(self, vm_id, tenant_id)
wait_for_operation(self, operation_id, timeout, polling_time)
Testing
Install development requirements.
pip install pytest pytest-env tcpping2
Run the tests.
Warning: Your account could be charged for VMs creation
export CLIENT_ID=<CLIENT_ID>
export API_KEY=<API_KEY>
pytest flops/tests/*
Metadata
Release files for flops 0.1.4
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 |
|---|---|---|---|---|
| flops-0.1.4.tar.gz | 6.3 kB | Without provenance | Details for flops-0.1.4.tar.gz |
Release files / flops-0.1.4.tar.gz
| Download URL | flops-0.1.4.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f9f0054b94a64813037f4cd350dc69b01e6684d3cfe91b5951e29e0471b02c5
|
|
BLAKE2b-256 checksum How to use checksums |
5f4eda5a12ad48f1b4ad03d687788c2f171484abfd0c00478b1878ccde99c7c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for flops 0.1.4
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.