
Security News
Python Adopts Standard Lock File Format for Reproducible Installs
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
digitaloceanobjects, represents all digital ocean services as objects, hiding all those horrible api calls.
everyone: I wish, for once, to just have a simple object oriented experience with the api.
digitaloceanobjects:
Please visit GitHub page for documentation that has navigation that works.
Here are your options.
The most popular way is to install the latest package available on pypi.
You can install digitaloceanobjects using pip3
pip3 install -U digitaloceanobjects
You can uninstall if you like using,
pip3 uninstall digitaloceanobjects
There are a few ways to install this python package from a clone of its github repo. Check out a copy and try the following...
From the root of the repo build a repo, and check the repo.
python3 setup.py sdist
twine check dist/*
Check the newly created dist directory for newly created .tar.gz files. This is your .tar.gz package and you can install using...
pip3 install ./dist/digitaloceanobjects-0.0.17.tar.gz
You can still uninstall using the same commands,
pip3 uninstall digitaloceanobjects
!WARNING! Install does not track which files, and where they are placed. So, you need to keep a record of there python3 does this.
This is how... from the github repo root directory.
sudo python3 setup.py install --record files.txt
You can uninstall using by playing back that files.txt file,
sudo xargs rm -rf < files.txt
Using this method you can modify this packages code and have changes immediately available. Perfect for if you want to tinker with the library, poke around and contribute to the project.
From the cloned repository root directory.
pip3 install -e ./
You can uninstall using the usual command,
pip3 uninstall digitaloceanobjects
Set the DIGITALOCEAN_ACCESS_TOKEN environment variable with your api key.
export DIGITALOCEAN_ACCESS_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
You don't need to look too deeply here, this is for information only.
digitaloceanobjects is powered by a baserestapi class from the following project.
https://github.com/zorani/cloudapi/blob/main/cloudapi/baserestapi.py
digitaloceanobjects/digitaloceanapi/digitaloceanapiconnection.py inherits baserestapi, baseresapi takes care of all the tricky rate limiting.
Inside /digitaloceanapiconnection.py you will find a 'callrateperhour' variable set to the current digital ocean limit of 5000. digitalocean-objects converts 'callrateperhour' to seconds between requests.
You will also see the following variables.
geometric_delay_multiplier: If a request fails, the 'seconds between requests' is increased by multiplying by this number.
maximum_geometric_delay_multiplicaiton: How many times should you increase the 'seconds between requests' before considering it a fail.
maximum_failed_attempts: a failed attempt is put to the back of an internal queue for a retry. how many failed attempts are allowed before returning the response with failure codes and content.
BaseRESTAPI.__init__(
self,
baseurl="https://api.digitalocean.com",
callrateperhour=5000,
geometric_delay_multiplier=2,
maximum_geometric_delay_multiplications=6,
maximum_failed_attempts=3,
)
Okay!! Okay!! Here is a quick start example!
Look how easy it is to work with digitaloceanobjects...
...read the code comments...
#!/usr/bin/env python3
from digitaloceanobjects import Droplet, DropletManager
from digitaloceanobjects import Volume, VolumeManager
#Create a droplet manager, to you know... manage your droplets.
droplet_manager = DropletManager()
#Create a new droplet.
my_brand_new_droplet = droplet_manager.create_new_droplet(
name="test-droplet",
region="ams3",
size="s-1vcpu-1gb",
image="ubuntu-16-04-x64",
tags=["digitalocean", "objects", "are", "great"],
)
#What? Done already?
#Yup... now output the droplet details.
print(type(my_brand_new_droplet))
print(my_brand_new_droplet.attributes)
#Want to attache a volume? No problem...
#Create a volume manager.
volume_manager = VolumeManager()
#You'll need a volume, so lets create a new volume.
my_brand_new_volume = volume_manager.create_new_volume(
size_gigabytes=10,
name="test-volume",
region="ams3",
description="BlockStoreFor Examples",
filesystem_type="ext4",
filesystem_label="example",
tags=["is", "it", "really", "this", "easy"],
)
#Well... damn that was easy. Peek at the volume object and the attributes. Nice.
print(type(my_brand_new_volume))
print(my_brand_new_volume.attributes)
#So, now just ask your droplet to attach your new volume.
my_brand_new_droplet.attach_a_volume(my_brand_new_volume)
#Still don't beleive how easy this was? Check the droplet attributes, you will now have a volume id attached to it.
print(my_brand_new_droplet.attributes.volume_ids)
Hope you're happy...
... now read the rest of the documentation to see what other amazing things you can do!
Did you notice in the quick start example above we didn't at any point check to see if the droplet, or the volume were ready and available?
Well... that's because digitaloceanobjects is 'blocking', it waits for an operation on digital ocean to complete before returning.
You can code away, without any worries.
For example, digitaloceanobjects will wait for a droplet to be ready before any further actions are applied to it. You can't attach a volume to a droplet that hasn't finished setting up.
If you want to setup multiple droplets concurrently you should thread your droplet set up script so you're not waiting on independent services.
Retrieve information about your current digital ocean account.
from digitaloceanobjects import AccountManager
account_manager=AccountManager()
droplet_limit = account_manager.droplet_limit()
floating_ip_limit = account_manager.floating_ip_limit()
volume_limit = account_manager.volume_limit()
email = account_manager.email()
email_verified = account_manager.email_verified()
uuid = account_manager.uuid()
status = account_manager.status()
status_message = account_manager.status_message()
The sizes objects represent different packages of hardware resources that can be used for Droplets. When a Droplet is created, a size must be selected so that the correct resources can be allocated.
Each size represents a plan that bundles together specific sets of resources. This includes the amount of RAM, the number of virtual CPUs, disk space, and transfer. The size object also includes the pricing details and the regions that the size is available in.
Import the size object, and the sizemanager.
from digitaloceanobjects import Size, SizeManager
The size manager contains methods to query information about available sizes on digital ocean.
size_manager=SizeManager()
list_of_size_objects=size_manager.retrieve_sizes()
Size objects contains an attributes data class with the standard digital ocean size attributes.
The size objects worked on by the above manager contain a data class with attributes describing the available digital ocean sizes.
class Size:
def __init__(self):
self.attributes = SizeAttributes()
@dataclass
class SizeAttributes:
slug: str = None
available: bool = None
transfer: float = None
price_monthly: float = None
price_hourly: float = None
memory: int = None
vcpus: int = None
disk: int = None
regions: list = field(default_factory=list)
description: str = None
A region in DigitalOcean represents a datacenter where Droplets can be deployed and images can be transferred.
Each region represents a specific datacenter in a geographic location. Some geographical locations may have multiple "regions" available. This means that there are multiple datacenters available within that area.
Import the digitaloceanobject Region and RegionManger to interact with Regions.
from digitaloceanobjects import Region, RegionManager
Create a region manager.
region_manager = RegionManager()
Retrieve a list of region objects.
list_of_region_objects = region_manager.retrieve_all_regions()
Region objects contains an attributes data class with the standard digital ocean region attributes.
class Region:
def __init__(self):
self.attributes = RegionAttributes()
...
@dataclass
class RegionAttributes:
slug: str = None
name: str = None
sizes: list = field(default_factory=list)
available: bool = None
features: list = field(default_factory=list)
SSH Keys. DigitalOcean allows you to add SSH public keys to the interface so that you can embed your public key into a Droplet at the time of creation. Only the public key is required to take advantage of this functionality.
Import the digitaloceanobject SSHKey and SSHKeyManger to interact with SSH Keys.
from digitaloceanobjects import SSHKey, SSHKeyManager
Create an SSH key manager.
sshkey_manager = SSHKeyManager()
Returns a list of SSHKey objects each containing details of existing keys.
list_of_sshkey_objects=sshkey_manager.retrieve_all_sshkeys()
'upload' a new key to digital ocean by providing your public key, and an easy to remember name.
Returns an SSHKey object with details of your new key stored in it's attribute data class.
sshkey_object=sshkey_manager.create_new_key(name:str, public_key:str)
Each SSH Key has an ID. Using this ID you can retrieve information on an existing SSH Key.
Returns an SSHKey object with details of your existing key stored in it's attribute data class.
sshkey_object=sshkey_manager.retrieve_sshkey_with_id(id:int)
SSH Key objects contains an attributes data class with the standard digital ocean SSH Key attributes.
sshkey_object=SSHKey()
class SSHKey:
def __init__(self):
self.attributes = SSHKeyAttributes()
...
@dataclass
class SSHKeyAttributes:
id: str = None
fingerprint: str = None
public_key: str = None
name: str = None
To work on your digital ocean ssh keys first retrieve your ssh key objects using the ssh key object manager. Then apply the objects following methods.
Then call the objects update name method with your new ssh key name.
sshkey_object.update_name(name:str)
You can delete an ssh key by calling the objects delete method.
sshkey_object.delete()
A Droplet is a DigitalOcean virtual machine.
Import the digitaloceanobject Droplet and DropletManger to interact with or create new droplets.
from digitaloceanobjects import Droplet, DropletManager
Create a droplet manager.
droplet_manager = DropletManager()
To create a new droplet use the following method supplying your desired droplet Attribute Values.
droplet_object = droplet_manager.create_new_droplet(
name="example.com",
region="nyc3",
size="s-1vcpu-1gb",
image="ubuntu-16-04-x64",
ssh_keys=[],
backups=False,
ipv6=True,
user_data=None,
private_networking=None,
volumes=None,
tags=["bananas"],
)
You can retreive an existing droplet by calling the following method and supplying the droplets id.
A droplet object will be returned. The droplet object will contain the standard digital ocean droplet attributes.
droplet_object = droplet_manager.retrieve_droplet_by_id(id:int)
Many droplets can have the same name.
To retrieve a list of droplet objects that have a particular name use the following method supplying your name.
list_of_droplet_objects = droplet_manager.retrieve_droplet_by_name(name:str)
To retrieve all droplets in your account apply the following method.
A list of droplet objects will be returned.
list_of_droplet_objects = droplet_manager.retrieve_all_droplets()
You can tag droplets with as many tags as you like.
This method will return a list of digital ocean objects that contain any of the tags you provide in a list.
list_of_droplet_objects = droplet_manager.retrieve_droplets_with_any_tags(tag:list)
This method will return a list of droplet objects, but only throse droplets that have at least all of the tags that you specify in a list of tags.
list_of_droplet_objects = droplet_manager.retrieve_droplets_with_all_tags(tag:list)
This method will return a list of droplet objects that exactly match a list of tags that you specify.
list_of_droplet_objects = droplet_manager.retrieve_droplets_with_only_tags(tag:list)
You can also delete droplets by tags.
This method allows you to delete all droplets that contain any, one or more, of a list of tags that you specify.
droplet_manager.delete_droplets_with_any_tags(tag:list)
This method will delete any droplets that contain all, at least all, of the tags that you specify.
droplet_manager.delete_droplets_with_all_tags(tag:list)
This method will delete droplets that match exactly a tag list that you specify.
droplet_manager.delete_droplets_with_only_tags(tag:list)
The droplet manager allowes you to request droplet deletion by supplying a droplet id.
You might prefer to delete a droplet by calling a droplet objects delete method directly though.
droplet_manager.delete_droplet_by_id(id:int)
Droplet objects contains an attributes data class with the standard digital ocean droplet attributes.
Some of the droplet attributes such as region
and image
can be further inspected by retrieving their relative digitaloceanobject objects.
droplet_object=Droplet()
class Droplet:
def __init__(self, status=None):
self.attributes = DropletAttributes()
self.attributes.status = status
self.deleted=False
...
@dataclass
class DropletAttributes:
id: int = None
name: str = None
memory: int = None
vcpus: int = None
disk: int = None
locked: bool = None
created_at: str = None
status: str = None
backup_ids: list = field(default_factory=list)
snapshot_ids: list = field(default_factory=list)
features: list = field(default_factory=list)
region: object = field(default_factory=list)
image: object = field(default_factory=list)
size: object = field(default_factory=list)
size_slug: str = None
networks: object = field(default_factory=list)
kernel: object = field(default_factory=list)
next_backup_window: object = field(default_factory=list)
tags: list = field(default_factory=list)
volume_ids: list = field(default_factory=list)
vpc_uuid: list = field(default_factory=list)
A reboot action is an attempt to reboot the Droplet in a graceful way, similar to using the reboot command from the console.
You can reboot a droplet by calling the following method.
droplet_object.reboot()
A power cycle action is similar to pushing the reset button on a physical machine, it's similar to booting from scratch.
You can power cycle a droplet by calling the following method.
droplet_object.powercycle()
A shutdown action is an attempt to shutdown the Droplet in a graceful way, similar to using the shutdown command from the console. Since a shutdown command can fail, this action guarantees that the command is issued, not that it succeeds. The preferred way to turn off a Droplet is to attempt a shutdown, with a reasonable timeout, followed by a power off action to ensure the Droplet is off.
You can shutdown a droplet by calling the following method.
droplet_object.shutdown()
A power_off event is a hard shutdown and should only be used if the shutdown action is not successful. It is similar to cutting the power on a server and could lead to complications.
You can power off a droplet by calling the following method.
droplet_object.poweroff()
You can power on a droplet by calling the following method.
droplet_object.poweron()
A rebuild action functions just like a new create.
You can supply an image slug, or an image id. Your droplet will be rebuilt, and you object attributes will be updated to reflect the changed this method makes.
You can rebuild a droplet by calling the following method.
droplet_object.rebuild(img:str)
You can rename a droplet by calling the following method.
droplet_object.rename(name:str)
You can create a droplet snapshot using the following method supplying a name to be use for your snapshot.
dropletsnapshot_object = droplet_object.createsnapshot(name:str)
A droplet snapshot object is returned. This type of snapshot, droplet snapshot, has more details than the usual snapshot covered later.
Here are the DropletSnapshot details.
class DropletSnapshot:
def __init__(self):
self.attributes = DropletSnapshotAttributes()
@dataclass
class DropletSnapshotAttributes:
id: int = None
name: str = None
distribution: str = None
slug: str = None
public: bool = None
regions: list = field(default_factory=list)
created_at: str = None
min_disk_size: int = None
type: str = None
size_gigabytes: float = None
You can retrieve all the DropletSnapshots for a droplet by calling the following method.
list_of_dropletsnapshot_objects = droplet_object.retrieve_snapshots()
You can retrieve a DropletSnapshot for a droplet by calling the following method and supplying an id.
This method will only search snapshots associated to the droplet.
dropletsnapshot_object = droplet_object.retrieve_snapshot_by_id(id:int)
A droplet may have block storage attached to it. You can retrieve a list of volume objects associated to your droplet by calling the following method.
list_of_volume_objects = droplet_object.retrieve_associated_volumes()
You can retrieve all associated volume snapshots by calling the following method.
list_of_volume_snapshot_objects = droplet_object.retrieve_associated_volume_snapshots()
!WARNING! These snapshot objects are slightly different to the droplet snapshots we just looked at.
The snapshots object created here can actually detail saved instances of both Droplet or a block storage volume, which is reflected in the 'resource_type' attribute.
You can attach a volume to a droplet by calling the following method and supplying a volume object.
droplet_object.attach_a_volume(target_volume:Volume)
You can similarly detach the volume by calling the following.
droplet_object.detach_a_volume(target_volume:Volume)
A Droplet restoration will rebuild an image using a backup image. The image ID that is passed in must be a backup of the current Droplet instance. The operation will leave any embedded SSH keys intact.
You can restore a droplet by calling the following method.
droplet_object.restore_droplet(image_id:int)
If you set disk=False
only the RAM will be increased.
If you set disk=True
the disk size will be upgraded, and you will not be able to shrink your droplet down to it's previous RAM size.
droplet_object.resize_droplet(
slug_size='s-1vcpu-2gb',
disk_resize=False
)
A Droplet must be powered off prior to resizing, digitaloceandroplets does this for you.
You can delete a droplet from your account by applying the following method.
droplet_object.delete()
This method sets your objects droplet_object.deleted=True
so object methods will no longer work.
DigitalOcean Block Storage Volumes provide expanded storage capacity for your Droplets and can be moved between Droplets within a specific region. Volumes function as raw block devices, meaning they appear to the operating system as locally attached storage which can be formatted using any file system supported by the OS. They may be created in sizes from 1GiB to 16TiB.
Import the digitaloceanobject Volume and VolumeManger to interact with or create new volumes.
from digitaloceanobjects import Volume, VolumeManager
Create a volume manager.
volume_manager = VolumeManager()
To create a new volume use the following method supplying your desired volume Attribute Values.
volume_object = volume_manager.create_new_volume(
size_gigabytes=10,
name="testingavolume",
region="ams3",
description="BlockStoreExample",
filesystem_type="ext4",
filesystem_label="example",
tags=["banana"],
)
Note: You can only create one volume per region with the same name.
To list all available volumes on your account apply the following method.
A list of volume objects will be returned.
list_of_volume_objects=volume_manager.retrieve_all_volumes()
To list volumes on your account that match a specified name use the following method.
list_of_volume_objects=volume_manager.retrieve_all_volumes_by_name(name:str)
To retrieve a volume by id, apply the following method.
volume_object=volume_manager.retrieve_volume_by_id(id:int)
You can also pick out a specific existing volume by name and region, but calling the following method.
volume_object=volume_manager.retrieve_volume_by_name_region(
name:str,
region:str
)
To retrieve a list of volumes that match any, at least one, of your specified tags use the following method and supply a list of tag strings.
list_of_volume_objects=volume_manager.retrieve_volumes_with_any_tags(tag:list)
To retrieve a list of volumes that are tagged with all, at least all, of your specified tags use the following command.
list_of_volume_objects=volume_manager.retrieve_volumes_with_all_tags(tag:list)
To retrieve a list of volumes that are tagged with only, exactly matching, your list of specified tags, apply the following method supplying a list of tag strings.
list_of_volume_objects=volume_manager.retrieve_volumes_with_only_tags(tag:list)
The volume manager allows you to delete a volume by supplying its ID.
Though you may prefer to delete a volume by directly calling delete on its volume object.
volume_manager.delete_volumes_by_id(id:int)
The volume manager allows you to delete a volume by supplying its name and region.
Though you may prefer to delete a volume by directly calling delete on its volume object.
volume_manager.delete_volume_by_name_region(
name:str,
region:str
)
You can delete all volumes that match any of, at least one, of your specified tags by applying the following method and supplying a list of tag strings.
volume_manager.delete_volumes_with_any_tags(tag:list)
You can delete all volumes that contain, at least have all, of your specified tags by applying the following method and supplying a list of tag strings.
volume_manager.delete_volumes_with_all_tags(tag:list)
You can also delete all volume that only contain, that match exactly, your list of specified tag strings by applying the following method.
volume_manager.delete_volumes_with_only_tags(tag:list)
Volume objects contain an attributes data class with the standard digital ocean volume attributes.
volume_object=Volume()
class Volume:
def __init__(self):
self.attributes = VolumeAttributes()
self.deleted=False
...
@dataclass
class VolumeAttributes:
id: str = None
region: object = field(default_factory=list)
droplet_ids: list = field(default_factory=list)
name: str = None
description: str = None
size_gigabytes: int = None
created_at: str = None
filesystem_type: str = None
filesystem_label: str = None
tags: list = field(default_factory=list)
You can create a snapshot from your volume using the following method.
A snapshot will be returned.
snapshot_object=volume_object.create_snapshot(
name:str,
tags:list
)
You can retrieve a list of snapshots for your object using the following method.
A list of snapshot objects will be returned.
list_of_snapshot_objects=volume_object.retrieve_snapshots()
You can detach a volume from a droplet by calling the following method. No need to supply details of a droplet as volumes can only be attached to one droplet at a time. This method just makes sure the volume object detaches.
volume_object.detach_from_droplets()
To resize a volume to a new size in GiB (1024^3), call the following method.
Volumes may only be resized upwards. The maximum size for a volume is 16TiB.
volume_object.resize(size_gigabytes:int)
Snapshots are saved instances of a Droplet or a block storage volume, which is reflected in the resource_type
attribute. In order to avoid problems with compressing filesystems, each defines a min_disk_size
attribute which is the minimum size of the Droplet or volume disk when creating a new resource from the saved snapshot.
Import the digitaloceanobject Snapshot and SnapshotManger to interact with or create new snapshots.
from digitaloceanobjects import Snapshot, SnapshotManager
Create a snapshot manager.
snapshot_manager=SnapshotManager()
To retrieve all existing snapshots call the following method.
A list of Snapshot objects will be returned.
list_of_snapshot_objects=snapshot_manager.retrieve_all_snapshots()
To retrieve a list of only droplet snapshots call the following method. Snapshot objects will be returned, remember to not confiuse this with DropletSnapshot objects.
list_of_snapshot_objects=snapshot_manager.retrieve_all_droplet_snapshots()
To retrieve a list of only volume snapshots call the following method.
list_of_snapshot_objects=snapshot_manager.retrieve_all_volume_snapshots()
You can retrieve a snapshot object by ID.
snapshot_object=snapshot_manager.retrieve_snapshots_id(id:int)
Snapshot objects contains an attributes data class with the standard digital ocean snapshot attributes.
snapshot_object=Snapshot()
class Snapshot:
def __init__(self):
self.attributes = SnapshotAttributes()
...
@dataclass
class SnapshotAttributes:
id: str = None
name: str = None
created_at: str = None
regions: list = field(default_factory=list)
resource_id: str = None
resource_type: str = None
min_disk_size: int = None
size_gigabytes: float = None
tags: list = field(default_factory=list)
You can delete a snapshot from your account by calling the snapshot object delete method.
snapshot_object.delete()
DigitalOcean Floating IPs are publicly-accessible static IP addresses that can be mapped to one of your Droplets. They can be used to create highly available setups or other configurations requiring movable addresses.
Floating IPs are bound to a specific region.
Import the digitaloceanobject FloatingIP and FloatingIPManger to interact with or create new floating ips.
from digitaloceanobjects import FloatingIP, FloatingIPManager
Create a floating IP manager.
floatingip_manager=FloatingIPManager()
To retrieve all floating IPs on your account, call the following method.
A list of floating ip objects will be returned.
list_of_floatingip_objects=floatingip_manager.retrieve_all_floating_ips()
Creates a floating IP and attaches it straight to the specified droplet object.
A floating ip object is returned with details of your new floating ip.
floatingip_object=floatingip_manager.create_new_floating_ip(droplet_object:Droplet)
You can reserve a floating ip in a specified region by calling the following method and specifying a region slug.
floatingip_object=floatingip_manager.reserve_ip_for_region(region_slug:str)
You can retrieve details of floating ip by using the ip address itself. Call the following method and specifying the ip address.
floatingip_object=floatingip_manager.retrieve_floating_ip(ip:str)
Floating IP objects contains an attributes data class with the standard digital ocean floating IP attributes.
floatingip_object=FloatingIP()
class FloatingIP:
def __init__(self):
self.attributes = FloatingIPAttributes()
...
@dataclass
class FloatingIPAttributes:
ip: str = None
region: object = None
droplet: object = None
locked: bool = None
You can delete a floating ip from your account by calling the following.
floatingip_object.delete()
You can unasign a floating ip from a droplet by calling the following. Specifying a droplet is not necessary.
floatingip_object.unassign()
You can retrieve all the actions applied to an ip by calling the following method.
A list of action objects will be returned.
list_of_action_objects=floatingip_object.retrieve_all_actions()
You can retrieve a specific action by specifying its id and using the following method.
action_object=floatingip_object.retrieve_existing_actions(action_id:int)
Actions are records of events that have occurred on the resources in your account. These can be things like rebooting a Droplet, or transferring an image to a new region.
An action object is created every time one of these actions is initiated. The action object contains information about the current status of the action, start and complete timestamps, and the associated resource type and ID.
Every action that creates an action object is available through this endpoint. Completed actions are not removed from this list and are always available for querying.
Import the digitaloceanobject Action and ActionManger to interact with actions.
from digitaloceanobjects import Action, ActionManager
Create an action manager.
action_manager=ActionManager()
This will be the entire list of actions taken on your account, so it will be quite large. As with any large collection returned by the API, the results will be paginated with only 20 on each page by default but the following method collects them all, and returns all of them in a list of action objects.
If you want to have direct access to the api call please check the actions.py
. You can paginate using the api call but still benefit from the rate limit management of digitaloceanobjects.
A list of Action Objectsis returned.
list_of_action_objects=action_manager.retrieve_all_actions()
You can retreive one action at a time if you like, by specifying the action id.
action_object=action_manager.retrieve_action(action_id:int)
Action objects contains an attributes data class with the standard digital ocean action attributes.
action_object=Action()
class Action:
def __init__(self, action_attributes: ActionAttributes):
self.attributes = action_attributes
'''
@dataclass
class ActionAttributes:
id: int = None
status: str = None
type: str = None
started_at: str = None
completed_at: str = None
resource_id: int = None
resource_type: str = None
region: object = None
region_slug: str = None
Some exceptions for you to catch, to help your code run smoother.
ErrorDropletNotFound
ErrorDropletNameContainsInvalidChars
ErrorDropletSlugSizeNotFound
ErrorDropletResizeDiskError
ErrorAccountDropletLimitReached
ErrorDropletAttachedVolumeCountAlreadAtLimit
ErrorVolumeAlreadyExists
ErrorVolumeNotFound
ErrorVolumeResizeValueTooLarge
ErrorVolumeResizeDirection
ErrorAccountVolumeLimitReached
ErrorSnapshotNotFound
ErrorActionDoesNotExists
ErrorActionFailed
ErrorNotSameRegion
ErrorRegionDoesNotExist
ErrorAccountFloatingIPLimitReached
ErrorFloatingIPDoesNotExists
ErrorDropletAlreadyHasFloatingIP
ErrorSSHkeyDoesNotExists
FAQs
digitaloceanobjects, represents all digital ocean services as objects, hiding all those horrible api calls.
We found that digitaloceanobjects demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.