New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cudo-compute

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cudo-compute

A client for cudocompute.com

  • 0.3.6
  • PyPI
  • Socket score

Maintainers
1

Cudo Compute

To use this client install cudoctl and run ./cudoctl init follow the steps to enter your API key and choose your project.

Then when you call cudo_api in python it will grab your API key from the yaml file created by cudoctl.

pip install cudo-compute

To use the api key and project set in cudoctl command line tool:



vm_api = cudo_api.virtual_machines()
vms = vm_api.list_vms(cudo_api.project_id())

If you don't want to use the automatic key you can supply your own, but you must also supply the project id manually too.

from cudo_compute import cudo_api

api_key = "s8dhap8dha8a98a9e88ewe90w9e"
project = "my-project"    
vm_api = cudo_api.virtual_machines(api_key)
vms = vm_api.list_vms(project_id)

More examples of various api calls can be found in examples.

Documentation for API Endpoints

How to create each API, methods are below:

from cudo_compute import cudo_api

key_api = cudo_api.api_keys()
billing_api = cudo_api.billing()
dc_api = cudo_api.data_centers()
disk_api = cudo_api.disks()
mt_api = cudo_api.machine_types()
net_api = cudo_api.networks()
store_api = cudo_api.object_storage()
perm_api = cudo_api.permissions
projects_api = cudo_api.projects()
ssh_api = cudo_api.ssh_keys()
search_api = cudo_api.search()
vm_api = cudo_api.virtual_machines()
def_api = cudo_api.default()

All URIs are relative to https://rest.compute.cudo.org

ClassMethodHTTP requestDescription
APIKeysApidelete_api_keyDELETE /v1/api-keys/{name}Delete
APIKeysApigenerate_api_keyPOST /v1/api-keysGenerate
APIKeysApilist_api_keysGET /v1/api-keysList
BillingApicreate_billing_accountPOST /v1/billing-accountsCreate a billing account
BillingApicreate_billing_account_credit_paymentPOST /v1/billing-accounts/{id}/creditAdd credit to billing account
BillingApidelete_billing_accountDELETE /v1/billing-accounts/{id}Delete billing account
BillingApiget_billing_accountGET /v1/billing-accounts/{id}Get a billing account
BillingApiget_billing_account_detailsGET /v1/billing-accounts/{id}/detailsGet billing account details
BillingApiget_billing_account_payment_methodsGET /v1/billing-accounts/{id}/payment-methodsGet payment methods
BillingApiget_billing_account_setup_intentGET /v1/billing-accounts/{id}/setup-intentGet setup intent
BillingApiget_billing_account_spend_detailsGET /v1/billing-accounts/{billingAccountId}/spend/detailsGet spend details
BillingApilist_billing_account_credit_balance_transactionsGET /v1/billing-accounts/{id}/credit-balance-transactionsList credit balance transactions on a billing account
BillingApilist_billing_account_invoicesGET /v1/billing-accounts/invoicesList invoices
BillingApilist_billing_account_transactionsGET /v1/billing-accounts/{id}/transactionsList transactions on a billing account
BillingApilist_billing_accountsGET /v1/billing-accountsList billing accounts
BillingApilist_outstanding_invoicesGET /v1/billing-accounts/invoices/outstandingGet outstanding invoices
BillingApiremove_billing_account_payment_methodDELETE /v1/billing-accounts/{id}/payment-methods/{paymentMethodId}Remove payment method
BillingApiset_billing_account_default_payment_methodPOST /v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-defaultSet default payment method
BillingApiupdate_billing_accountPATCH /v1/billing-accounts/{billingAccount.id}Update billing account
DataCentersApicount_hostsGET /v1/data-centers/{dataCenterId}/host-countGet host count
DataCentersApicreate_data_centerPOST /v1/data-centersCreate data center
DataCentersApidelete_data_centerDELETE /v1/data-centers/{id}Delete data center
DataCentersApiget_data_centerGET /v1/data-centers/{id}Get data center
DataCentersApiget_data_center_live_utilizationGET /v1/data-centers/{id}/live-utilizationGet live utilization
DataCentersApiget_data_center_revenue_by_resourceGET /v1/data-centers/{id}/revenue-by-resourceGet revenue by resource
DataCentersApiget_data_center_revenue_time_seriesGET /v1/data-centers/{id}/revenueGet revenue time series
DataCentersApilist_clustersGET /v1/data-centers/{dataCenterId}/clustersList clusters
DataCentersApilist_data_centersGET /v1/data-centersList data centers
DataCentersApilist_hostsGET /v1/data-centers/{dataCenterId}/hostsList hosts
DataCentersApiupdate_data_centerPATCH /v1/data-centers/{dataCenter.id}Update data center
DisksApiattach_storage_diskPATCH /v1/projects/{projectId}/disk/{id}/attachAttach storage disk to VM
DisksApicreate_disk_snapshotPOST /v1/projects/{projectId}/disks/{id}/snapshotsCreate Disk Snapshot
DisksApicreate_storage_diskPOST /v1/projects/{projectId}/disksCreate storage disk
DisksApidelete_disk_snapshotDELETE /v1/projects/{projectId}/disks/{id}/snapshotsDelete Disk Snapshots
DisksApidelete_storage_diskDELETE /v1/projects/{projectId}/disks/{id}Delete storage disk
DisksApidetach_storage_diskPUT /v1/projects/{projectId}/disk/{id}/detachDetach storage disk from VM
DisksApiget_diskGET /v1/projects/{projectId}/disks/{id}List disks
DisksApilist_disk_snapshotsGET /v1/projects/{projectId}/disks/{id}/snapshotsList Disk Snapshots
DisksApilist_disksGET /v1/projects/{projectId}/disksList disks
DisksApirevert_diskPOST /v1/projects/{projectId}/disks/{id}/revertRevert Disk to Snapshot
MachineTypesApiget_machine_typeGET /v1/data-centers/{dataCenterId}/machine-types/{machineType}Get a machine type in a data center
MachineTypesApiget_machine_type_live_utilizationGET /v1/data-centers/{dataCenterId}/machine-types/{machineType}/live-utilizationGet the utilization for a machine type in a data center
MachineTypesApilist_machine_typesGET /v1/data-centers/{dataCenterId}/machine-typesList machine types for a data center
NetworksApicreate_networkPOST /v1/projects/{projectId}/networksCreate network
NetworksApicreate_security_groupPOST /v1/projects/{securityGroup.projectId}/networks/security-groupsCreate security group
NetworksApidelete_networkDELETE /v1/projects/{projectId}/networks/{id}Delete network
NetworksApidelete_security_groupDELETE /v1/projects/{projectId}/networks/security-groups/{id}Delete security group
NetworksApiget_networkGET /v1/projects/{projectId}/networks/{id}Get network
NetworksApiget_security_groupGET /v1/projects/{projectId}/networks/security-groups/{id}Get a security group
NetworksApilist_networksGET /v1/projects/{projectId}/networksList networks
NetworksApilist_security_groupsGET /v1/projects/{projectId}/networks/security-groupsList security groups
NetworksApistart_networkPOST /v1/projects/{projectId}/networks/{id}/startStart network
NetworksApistop_networkPOST /v1/projects/{projectId}/networks/{id}/stopStop network
NetworksApiupdate_security_groupPATCH /v1/projects/{securityGroup.projectId}/networks/security-groups/{securityGroup.id}Update security group
ObjectStorageApiactivatePOST /v1/projects/{projectId}/object-storage/activate/{dataCenterId}Allow the use of S3 compatible storage in a project
ObjectStorageApicreate_object_storage_userPOST /v1/projects/{projectId}/object-storage/users/{dataCenterId}Create user that stores keys for storage buckets
ObjectStorageApidelete_object_storage_keyDELETE /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}/keys/{accessKey}Delete object storage user key
ObjectStorageApidelete_object_storage_userDELETE /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}Delete object storage user
ObjectStorageApigenerate_object_storage_keyPOST /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}Generate access key for storage buckets
ObjectStorageApiget_object_storage_bucketGET /v1/projects/{projectId}/object-storage/buckets/{dataCenterId}/{id}Get details for a bucket
ObjectStorageApiget_object_storage_session_keyGET /v1/projects/{projectId}/object-storage/session-key/{dataCenterId}Generate temporary key for storage bucket access
ObjectStorageApiget_object_storage_userGET /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{userId}Get details about an object storage user
ObjectStorageApilist_object_storage_bucketsGET /v1/projects/{projectId}/object-storage/bucketsList buckets
ObjectStorageApilist_object_storage_usersGET /v1/projects/{projectId}/object-storage/usersList storage users
PermissionsApiadd_billing_account_user_permissionPOST /v1/billing-accounts/{billingAccountId}/add-user-permissionAdd billing account user
PermissionsApiadd_data_center_user_permissionPOST /v1/data-centers/{dataCenterId}/add-user-permissionAdd data center user
PermissionsApiadd_project_user_permissionPOST /v1/projects/{projectId}/add-user-permissionAdd project user
PermissionsApilist_user_permissionsGET /v1/auth/permissionsList
PermissionsApiremove_billing_account_user_permissionPOST /v1/billing-accounts/{billingAccountId}/remove-user-permissionRemove billing account user
PermissionsApiremove_data_center_user_permissionPOST /v1/data-centers/{dataCenterId}/remove-user-permissionRemove data center user
PermissionsApiremove_project_user_permissionPOST /v1/projects/{projectId}/remove-user-permissionRemove project user
ProjectsApicreate_projectPOST /v1/projectsCreate
ProjectsApidelete_projectDELETE /v1/projects/{id}Delete
ProjectsApiget_projectGET /v1/projects/{id}Get
ProjectsApilist_project_ssh_keysGET /v1/project/{projectId}/ssh-keysList SSH keys
ProjectsApilist_projectsGET /v1/projectsList
ProjectsApiupdate_projectPATCH /v1/projects/{project.id}Update
SSHKeysApicreate_ssh_keyPOST /v1/ssh-keysCreate
SSHKeysApidelete_ssh_keyDELETE /v1/ssh-keys/{id}Delete
SSHKeysApiget_ssh_keyGET /v1/ssh-keys/{id}Get
SSHKeysApilist_ssh_keysGET /v1/ssh-keysList
SearchApilist_regionsGET /v1/regionsRegions
UserApicreate_identity_verification_sessionGET /v1/auth/create-identity-verification-sessionGet identity verification session
UserApidelete_userDELETE /v1/authDelete
UserApigetGET /v1/authGet
VirtualMachinesApiattach_security_groupPATCH /v1/projects/{projectId}/vm/{id}/security-group/attachAttach security group to VM
VirtualMachinesApiconnect_vmGET /v1/projects/{projectId}/vms/{id}/connectConnect via VNC
VirtualMachinesApicount_vmsGET /v1/projects/{projectId}/count-vmsCount
VirtualMachinesApicreate_private_vm_imagePOST /v1/projects/{projectId}/imagesCreate private VM image
VirtualMachinesApicreate_vmPOST /v1/projects/{projectId}/vmCreate virtual machine
VirtualMachinesApidelete_private_vm_imageDELETE /v1/projects/{projectId}/images/{id}Delete private VM image
VirtualMachinesApidetach_security_groupPATCH /v1/projects/{projectId}/vm/{id}/security-group/detachAttach security group to VM
VirtualMachinesApiget_private_vm_imageGET /v1/projects/{projectId}/images/{id}Get private VM image
VirtualMachinesApiget_vmGET /v1/projects/{projectId}/vms/{id}Get
VirtualMachinesApilist_private_vm_imagesGET /v1/projects/{projectId}/imagesList private VM images
VirtualMachinesApilist_public_vm_imagesGET /v1/vms/public-imagesList public VM images
VirtualMachinesApilist_vm_data_centersGET /v1/vms/data-centersList data centers
VirtualMachinesApilist_vm_disksGET /v1/projects/{projectId}/vms/{id}/disksList disks attached to VM
VirtualMachinesApilist_vm_gpu_modelsGET /v1/vms/gpu-modelsList GPU models
VirtualMachinesApilist_vm_machine_types2GET /v1/vms/machine-types-2List machine types v2
VirtualMachinesApilist_vmsGET /v1/projects/{projectId}/vmsList
VirtualMachinesApimonitor_vmGET /v1/projects/{projectId}/vms/{id}/monitorMonitor
VirtualMachinesApireboot_vmPOST /v1/projects/{projectId}/vms/{id}/rebootReboot
VirtualMachinesApiresize_vmPOST /v1/projects/{projectId}/vms/{id}/resizeResize vCPU and memory of VM
VirtualMachinesApiresize_vm_diskPATCH /v1/projects/{projectId}/vms/{id}/disksResize a VM's disk
VirtualMachinesApistart_vmPOST /v1/projects/{projectId}/vms/{id}/startStart
VirtualMachinesApistop_vmPOST /v1/projects/{projectId}/vms/{id}/stopStop
VirtualMachinesApiterminate_vmPOST /v1/projects/{projectId}/vms/{id}/terminateTerminate
VirtualMachinesApiupdate_private_vm_imagePOST /v1/projects/{projectId}/images/{id}Update private VM image
VirtualMachinesApiupdate_vm_metadataPOST /v1/projects/{projectId}/vm/{id}/metadataUpdate VM metadata
DefaultApiget_data_center_commitment_scheduleGET /v1/data-centers/{dataCenterId}/commitment-schedule
DefaultApiget_data_center_commitment_time_seriesGET /v1/data-centers/{dataCenterId}/commitment-time-series
DefaultApilist_billing_account_projectsGET /v1/billing-accounts/{id}/projects
DefaultApilist_data_center_machine_type_pricesGET /v1/data-centers/{dataCenterId}/machine-type-prices
DefaultApilist_vm_machine_typesGET /v1/vms/machine-types
DefaultApisearch_resourcesGET /v1/resources/search
DefaultApitrackPOST /v1/auth/track
DefaultApiupdate_vm_expire_timePOST /v1/projects/{projectId}/vm/{id}/expire-time
DefaultApiupdate_vm_passwordPOST /v1/projects/{projectId}/vm/{id}/password

Documentation For Models

Advanced Users / Development

The code is generated by swagger codegen cli.

Most code is generated in github actions see .github/workflows the generated code is put into a /src/cudo_compute directory The code gets modified and the helpers get copied in from /helpers.

./codegen.sh generates docs directory with source code and documentation.

If you wish to customise how the API key or project is selected see the code in the helpers directory.

Install the latest test version:

pip install --upgrade --index-url https://test.pypi.org/simple/ cudo-compute

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc