Releases: datastax/astrapy
Release v1.5.0
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
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
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
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 toapi_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 forembedding_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
- 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
- Integration testing covers Astra and nonAstra smoothly:
* idiomatic library
* vectorize_idiomatic
* nonAstra admin, i.e. namespace crud - Add the
TokenProvider
abstract class => andStaticTokenProvider
,UsernamePasswordTokenProvider
- Introduce CHANGES file.
- Add
__eq__
and_copy
methods toAPICommander
class - Allow
delete_many({})
with empty filter - Implement
include_sort_vector
option toCollection.find
andget_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 ofdelete_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
Raise default chunk size for insert_many to 50
Improvements in docstrings, testing, support for latest responses from vectorize.
Release v1.2.0
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
Adds estimated_document_count
method to Collection class.
Release v1.0.0
Version 1.0.0 "idiomatic"
What's Changed
- Split classes, modules, tests to keep the "idiomatic" layer well separate and not touch the "astrapy" layer by @hemidactylus in #222
- DDL and some DML methods to m1 by @hemidactylus in #223
- passing secondary keyspace to action workflows by @hemidactylus in #224
- fix bug in copy and to_[a]sync when set_caller is later used by @hemidactylus in #226
- full cross-namespace management in DDL by @hemidactylus in #227
- More DDL methods and signature adjustments for Database by @hemidactylus in #232
- Sl overridable copy methods by @hemidactylus in #233
- Cursor/AsyncCursor, find and distinct by @hemidactylus in #234
- remove all 'unsupported' clutter; implement find_one (a/sync) by @hemidactylus in #235
- DML for idiomatic + necessary changes around by @hemidactylus in #238
- bulk_write method by @hemidactylus in #239
- More management methods by @hemidactylus in #241
- Sl collateral commands by @hemidactylus in #242
- commandcursor (+async), used in list_collections by @hemidactylus in #243
- Sl collection options + cap-aware count_documents by @hemidactylus in #244
- Fix #245: Delete CHANGES.md by @erichare in #246
- collection.drop + database/collection info and related methods/properties (metadata) by @hemidactylus in #247
- Adapt to latest choices in API semantics by @hemidactylus in #248
- More syntax changes as discussed + all docstrings by @hemidactylus in #249
- Full support for dotted key names in
distinct
by @hemidactylus in #250 - Refactor to feature 'idiomatic' first, with full back-compat with 'astrapy' by @hemidactylus in #251
- add sorting in hashing for distinct and factor it away by @hemidactylus in #253
- Exception management with a hierarchy of Exception classes by @hemidactylus in #254
- Full timeout support by @hemidactylus in #255
- Sl api refinements by @hemidactylus in #256
- ObjectIDs and UUIDs handled throughout (+ tests) by @hemidactylus in #257
- Admin interfaces and classes by @hemidactylus in #258
- Docstrings for all the admin/client parts + minor improvements to docstrings around by @hemidactylus in #259
- Readme overhaul by @hemidactylus in #260
- exporting logger for back-compatibility by @hemidactylus in #261
- Sl adjustments by @hemidactylus in #262
- custom payload serialization for httpx to block NaNs by @hemidactylus in #264
- improved docstrings (minor stuff) by @hemidactylus in #265
- Methods repr/str to all objects for graceful display by @hemidactylus in #266
- Full test suite on client/admin classes by @hemidactylus in #267
- Abstract DatabaseAdmin, admin standard utility conversion/methods + tests thereof by @hemidactylus in #268
- Collection options is a dataclass and not a dict anymore by @hemidactylus in #269
- pdoc annotations to control auto-docs by @hemidactylus in #270
- logging, create_database signature by @hemidactylus in #271
- Added async support for admin, as alternate methods on original classes by @hemidactylus in #272
- use MultiCallTimeoutManager in create_collection methods by @hemidactylus in #273
- v1.0.0 ("pm convergenge m1") gets to master by @hemidactylus in #275
Full Changelog: v0.7.7...v1.0.0