Skip to main content

Arker Python SDK

Use the Arker Python SDK to fork VMs, run commands, and sync files.

PyPI

Install

pip install arker

The SDK requires Python 3.10 or later.

Get started

Sign up and get your API key at arker.ai/console.

ARKER_API_KEY, ARKER_PROVIDER, and ARKER_REGION must be set in the environment or passed directly to Arker().

Fork a source VM, run a command, sync a file, and delete the VM:

from arker import Arker

arker = Arker()
vm = arker.fork(source_vm_name="ubuntu-coding")

result = vm.run("python3 -c 'print(2 + 2)'")
print(result.stdout.decode())

vm.sync("/tmp/hello.txt", "hello from Arker")
print(vm.sync("/tmp/hello.txt").decode())

vm.delete()

Documentation and examples

Read the Arker documentation and browse the runnable examples.

License

Apache-2.0

Pools v2

Pools require the per-organization pools flag; a disabled organization receives 404 not_found. The three pool types are managed (Arker's multi-cloud compute), byoc (workers Arker launches in your cloud account), and self_hosted (BLAST workers you run). This replaces pools v1 and the earlier BYOC API: quotes, fixed purchase terms, prices, and the purchase idempotency key are removed with no compatibility layer.

Configure a regional endpoint (or provider and region) for pool operations. Listing pools uses the control plane across regions; use each returned pool's region for subsequent operations. Fork with exactly one of pool_id or pool_name; names are case-insensitive within a region. A fleet VM cannot be forked into a pool: use a supported image source instead. Pool VMs do not support interactive shells; use run for commands.

managed and byoc pools request resources with all three quantities (vcpu, memory_mib, disk_mib), including zeros; a self_hosted pool's resources is an optional cap. Every pool reports resources_reserved (what its workers contribute) and resources_provisioned (what its VMs use). A pool is creating until resources_reserved first reaches resources, then active; reason says what needs attention. A byoc pool (provider aws) needs setup: open byoc.setup_url in the specified AWS account and create the CloudFormation stack. A self_hosted pool's platform is set by its first worker; workers join with an API key of the pool with action join. Only managed pools take commitments.

Commitments last at least 24 hours, cannot overlap, and new commitments cannot start in the past. Started commitments must remain unchanged, including expired ones. The add-commitment helper reads the pool and appends to the entire list. Serialize commitment edits: the API has no conditional update or atomic append, so concurrent edits can overwrite unstarted commitments. Active commitments prevent shrinking or deletion; resizing to zero otherwise releases the reservation. Deleting a pool deletes every VM in it.

API errors retain their code, status, message, and server details. A 429 quota_exceeded is returned immediately; adjust the reservation/quota or remove unused pools instead of retrying. Ordinary rate limits keep the SDK's retry policy. capacity_unavailable means placement has no capacity; inspect the pool's reserved resources, workers, and state. Fleet-to-pool fork and unsupported shell refusals are surfaced without a fallback placement. Creation has no documented idempotency guarantee: after an ambiguous transport failure, inspect the pool list before creating again.

from arker import CreateManagedPoolRequest, PoolResources, PoolCommitment

pool = client.create_pool(
    CreateManagedPoolRequest(
        type="managed",
        platform="icelake",
        resources=PoolResources(vcpu=8, memory_mib=32768, disk_mib=102400),
    )
)
client.add_pool_commitment(
    pool.pool_id,
    PoolCommitment(
        starts_at="2027-01-01T00:00:00Z",
        ends_at="2027-01-02T00:00:00Z",
    ),
)
client.fork(image="ubuntu", pool_id=pool.pool_id)
client.rename_pool(pool.pool_id, None)  # Clear the name.

update_pool accepts UpdatePoolRequest or a dictionary. Dataclass fields set to None are omitted; use rename_pool(id, None) or {"name": None} to clear a name.

Metadata

Release files for arker 1.2.9

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

Source distribution (sdist)

Source distribution for arker 1.2.9
File Size Uploaded
arker-1.2.9.tar.gz 216.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arker 1.2.9
File Interpreter ABI Platform
arker-1.2.9-py3-none-any.whl Python 3 none any Details

Total release size: 326.0 kB

Release files / arker-1.2.9.tar.gz

Download URL arker-1.2.9.tar.gz
Size 216.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7c1c49ac4f39b4c55857203740f86d7cf9ae49c777223e44bb09e124d7c42c47
BLAKE2b-256 checksum
How to use checksums
dba3a0fc67956776e7353ddc6cad3d14c8c14bb2a58178245f07aedb8d8d7b4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / arker-1.2.9-py3-none-any.whl

Download URL arker-1.2.9-py3-none-any.whl
Size 109.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c1e395646b3be459a7bccd291894a16030530fcf8110e702d5ed0d7d4ac3d43
BLAKE2b-256 checksum
How to use checksums
dcbe36f72c7e70a8dd8e2503c9976c9c20390be7a2c76b16bf7155d88ab35bbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

1.3.0

2 release files

This release

1.2.9 This release

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.2.1

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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