Skip to content

Releases: datastax/astrapy

Release v1.5.0

21 Sep 15:31
bd99707
Compare
Choose a tag to compare

v. 1.5.0

Deprecation of "namespace-" terminology, replaced by "keyspace-" (removal in 2.0)

  • deprecation of all namespace method names
  • deprecation of the namespace= named argument to all methods
  • deprecation of the update_db_namespace parameter to create_*space

Deprecation of collection bulk_write method (removal in 2.0)
APICommander logs warnings received from the Data API
Full removal of "core library" from the current API:

  • DevOps API accessed through APICommander everywhere
  • Admin objects use APICommander consistently
  • [Async]Database and [Async]Collection directly use APICommander
  • Cursor library uses APICommander directly
  • Core library imports triggers a submodule-wide deprecation warning
  • (simplification of the vector/vectorize deprecator utility)

Widened exception hierarchy with:

  • DevOpsAPIHttpException
  • DevOpsAPITimeoutException
  • DevOpsAPIFaultyResponseException

Rearrangement into separate modules for:

  • constants, strings, magic numbers and settings
  • request low-level tools
  • payload/response transformations
  • (sometimes with temporary duplication to avoid depending on 'core')

Testing:

  • testing on HCD targets Data API v 1.0.16
  • added tests for APICommander
  • improved tests for admin classes

Logging of API requests made more uniform and easier to read
Replaced collections.abc.Iterator => typing.Iterator for python3.8 compatibility

Release v1.4.2

10 Sep 13:56
474fe4f
Compare
Choose a tag to compare

v. 1.4.2

Method 'update_one' of [Async]Collection: now invokes the corresponding API command.
Better URL-parsing error messages for the API endpoint (with guidance on expected format)
Improved __repr__ for: token/auth-related items, Database/Client classes, response+info objects
DataAPIErrorDescriptor can parse 'extend error' in the responses
Introduced DataAPIHttpException (subclass of both httpx.HTTPStatusError and DataAPIException)
testing on HCD:

  • DockerCompose tweaked to invoke docker compose
  • HCD 1.0.0 and Data API 1.0.15 as test targets

relaxed dependency on "uuid6" to most recent releases
core:

  • prefetched find iterators: fix second-thread hangups in some cases (by @cbornet)
  • added 'options' parameter to [Async]AstraDBCollection.update_one

Release v1.4.1

31 Jul 13:50
e5eedbc
Compare
Choose a tag to compare

v. 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)

Release v1.4.0

09 Jul 21:49
a4885a4
Compare
Choose a tag to compare

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_namespace" 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

Release v1.3.1

26 Jun 21:12
85a3077
Compare
Choose a tag to compare
  • 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

Release v1.3.0

22 Jun 07:04
4611be5
Compare
Choose a tag to compare
  • 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

Release v1.2.1

06 Jun 08:26
670326f
Compare
Choose a tag to compare

Raise default chunk size for insert_many to 50

Improvements in docstrings, testing, support for latest responses from vectorize.

Release v1.2.0

22 May 09:43
cb881ee
Compare
Choose a tag to compare

Vectorize support and non-Astra environment management.

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

Release v1.1.0

02 May 21:38
Compare
Choose a tag to compare

Adds estimated_document_count method to Collection class.

Release v1.0.0

11 Apr 09:24
Compare
Choose a tag to compare

Version 1.0.0 "idiomatic"

What's Changed

Full Changelog: v0.7.7...v1.0.0