From 53aa8475dc4ab0ab46229f5546b7af296ce54ac9 Mon Sep 17 00:00:00 2001 From: Eric Hare Date: Sat, 28 Oct 2023 07:10:36 -0700 Subject: [PATCH 1/2] Bump version and add some notes to example script --- .gitignore | 1 + astrapy/__init__.py | 2 +- scripts/astrapy_latest_interface.py | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 74ec67c0..9a3533e9 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ target/ # Browser test output junitresults.* +myvenv diff --git a/astrapy/__init__.py b/astrapy/__init__.py index 6f517cb5..b80d50f4 100644 --- a/astrapy/__init__.py +++ b/astrapy/__init__.py @@ -11,4 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.5.0" +__version__ = "0.5.1" diff --git a/scripts/astrapy_latest_interface.py b/scripts/astrapy_latest_interface.py index a692fe18..1f7724c2 100644 --- a/scripts/astrapy_latest_interface.py +++ b/scripts/astrapy_latest_interface.py @@ -12,7 +12,7 @@ # First, we work with devops token = os.getenv("ASTRA_DB_APPLICATION_TOKEN") -astra_ops = AstraDBOps(token) +astra_ops = AstraDBOps(token=token) # Define a database to create database_definition = { @@ -31,6 +31,7 @@ create_result = astra_ops.create_database(database_definition=database_definition) # Grab the new information from the database +# NOTE: Your database will take some time to initialize! database_id = create_result["id"] database_region = astra_ops.get_database()[0]["info"]["region"] database_base_url = "apps.astra.datastax.com" @@ -64,5 +65,5 @@ } ) -astra_db_collection.find_one({"name": "potato"}) +astra_db_collection.find_one({"name": "potato"}) # Not found astra_db_collection.find_one({"name": "Coded Cleats Copy"}) From d9e6ae9086fcfe083dd9557b57a7dc30932b8ada Mon Sep 17 00:00:00 2001 From: Eric Hare Date: Sat, 28 Oct 2023 07:11:13 -0700 Subject: [PATCH 2/2] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9a3533e9..74ec67c0 100644 --- a/.gitignore +++ b/.gitignore @@ -82,4 +82,3 @@ target/ # Browser test output junitresults.* -myvenv