Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AstraPy

Actions Status

AstraPy is a Pythonic SDK for DataStax Astra and Stargate

Resources

Getting Started

Install AstraPy

pip install astrapy

Setup your Astra client

from astrapy.base import AstraClient

astra_client = AstraClient(
        astra_database_id=ASTRA_DB_ID,
        astra_database_region=ASTRA_DB_REGION,
        astra_application_token=ASTRA_DB_APPLICATION_TOKEN,
    )

vector_client = AstraVectorClient(astra_client=astra_client)
test_namespace = vector_client.namespace(ASTRA_DB_KEYSPACE)
test_collection = vector_client.namespace(ASTRA_DB_KEYSPACE).collection(TEST_COLLECTION_NAME)

####Getting started Check out the notebook which has examples for finding and inserting information into the database, including vector commands.

Take a look at the vector tests and the collection tests for specific endpoint examples.

Using the Ops Client

You can use the Ops client to work the with Astra DevOps API. Check the devops tests

# astra_client created above
# create a keyspace using the Ops API
astra_client.ops.create_keyspace(database=ASTRA_DB_ID, keyspace=KEYSPACE_NAME)

Using the REST Client

You can use the REST client to work with the Astra REST API. API Reference

Release files for astrapy 0.5.0.dev1

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

Source distribution (sdist)

Source distribution for astrapy 0.5.0.dev1
File Size Uploaded
astrapy-0.5.0.dev1.tar.gz 12.7 kB Details

Built distribution (wheel)

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

Total release size: 51.8 kB

Release files / astrapy-0.5.0.dev1.tar.gz

Download URL astrapy-0.5.0.dev1.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
078954f5683405e0fb7cc178b26aebaa5e2d3d2b9af413231b6c75772a1535a4
BLAKE2b-256 checksum
How to use checksums
b0013520be23e580a559b8b042100a0e9b378e7a15b8f9d9a25b30bf43d4206c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / astrapy-0.5.0.dev1-py3-none-any.whl

Download URL astrapy-0.5.0.dev1-py3-none-any.whl
Size 39.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a1aac9e2137e765e867b9e973d32ed8a2fb3e605214c8e8010de1c9bca1dd76
BLAKE2b-256 checksum
How to use checksums
013fcbd98744c6c93181c1ee0a67418dd7f5cc346e2a08524a5bde1fcba229f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

2.3.1

2 release files

2.3.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

This release

0.5.0.dev1 This release

2 release files

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.2

1 release file

0.0.1

1 release file

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