Astrapy

Latest version: v1.5.2

Safety actively analyzes 702540 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

1.4.1

========
FindEmbeddingProvidersResult and descendant dataclasses:
- add handling of optional 'hint' and 'displayName' fields for parameters
- knowedge of optional-as-null vs optional-as-possibly-absent ancillary fields
Replace bson dependency with pymongo (297, by caseyclements)

1.4.0

========
DatabaseAdmin classes retain a reference to the Async/Database instance that spawned it, if any
- introduced a spawner_database parameter to database admin constructors
- database admin can retroactively set the db's working namespace upon creation of same
- Idiom `database = client.get_database(...); database.get_database_admin().create_namespace("the_namespace", update_db_namespace=True)`
Database (and AsyncDatabase) classes admit null namespace:
- default to "default_keyspace" only for Astra, otherwise null
- as long as null, most operations are unavailable and error out
- a `use_namespace` method to (mutably) set the working namespace on a database instance
AstraDBDatabaseAdmin class is fully region-aware:
- can be instantiated with an endpoint (also `id` parameter aliased to `api_endpoint`)
- requires a region to be specified with an ID, unless auto-guess can be done
VectorizeOps: support for find_embedding_providers Database method
Support for multiple-header embedding api keys:
- `EmbeddingHeadersProvider` classes for `embedding_api_key` parameter
- AWS header provider in addition to the regular one-header one
- adapt CI to cover this setup
Testing:
- restructure CI to fully support HCD alongside Astra DB
- add details for testing new embedding providers

1.3.1

========
Fixed bug in parsing endpoint domain names containing hyphens (287), by bradfordcp
Added isort for source code formatting
Updated abstractions diagram in README for non-Astra environments

1.3.0

========
Integration testing covers Astra and nonAstra smoothly:
- idiomatic library
- vectorize_idiomatic
- nonAstra admin, i.e. namespace crud
Add the TokenProvider abstract class => and StaticTokenProvider, UsernamePasswordTokenProvider
Introduce CHANGES file.
Add __eq__ and _copy methods to APICommander class
Allow delete_many({}) with empty filter
Implement include_sort_vector option to Collection.find and get_sort_vector to cursors
Add Content-Type header to all API requests
Added HCD and CASSANDRA Environment values (besides the other non-Astra DSE and OTHER)
Clearer string repr of cursors ('retrieved' => 'yielded so far')
Deprecation of collection delete_all method in favour of delete_many(filter={})
Introduction of a custom deprecation decorator for async method removal tests
Deprecation of vector,vectors and vectorize params from collections and Operations
Remove several long-deprecated methods from **core API** (i.e. internal changes):
AstraDBCollection.delete => delete_one
AstraDBCollection.upsert => upsert_one
AsyncAstraDBCollection.upsert => upsert_one
AstraDB.truncate_collection => AstraDBCollection.clear
AsyncAstraDB.truncate_collection => AsyncAstraDBCollectionclear
Add support for null tokens in the core library

1.2.1

========
Raise default chunk size for insert_many to 50
Improvements in docstrings, testing, support for latest responses from vectorize.

1.2.0

========
Non-Astra environment awareness:
astrapy.constants.Environment enum for the "environment" parameter to client, etc
flexibility and adaptive defaults for data api url
environment knowledge trickles throughout all classes (client, admins, databases)
DataAPIDatabaseAdmin class (i.e. for namespace CRUD)
(internal) astrapy.api_commander.APICommander
(internal) astrapy.api_options.{BaseAPIOptions, CollectionAPIOptions}
$vectorize support:
"service options" for creating/retrieving collections, covering $vectorize needs
embedding_api_key parameter to collection (for "header" usage)
collection-level timeout parameter (overridable in single method calls)
expand "projection" type to include slice projections
client.get_database can accept an API endpoint directly
insert_many and bulk_write default to ordered=False

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.