From b14cfa83ddcaee988519e7dd390e1512655ce10b Mon Sep 17 00:00:00 2001 From: David Gomes Date: Tue, 14 Jan 2025 11:57:28 -0500 Subject: [PATCH] Bumps to 0.2.0 (#9) --- HISTORY.rst | 7 ++++++- neon_api/__version__.py | 2 +- neon_api/client.py | 16 +++++++++++++--- pyproject.toml | 2 +- setup.py | 2 +- 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 6c41e73..a2091e0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,7 +1,12 @@ History ======= -0.1.5 +0.2.0 +----- + +- Bumps the OpenAPI schema used for the SDK + +0.1.6 ----- - Fixes database update HTTP method diff --git a/neon_api/__version__.py b/neon_api/__version__.py index 1276d02..d3ec452 100644 --- a/neon_api/__version__.py +++ b/neon_api/__version__.py @@ -1 +1 @@ -__version__ = "0.1.5" +__version__ = "0.2.0" diff --git a/neon_api/client.py b/neon_api/client.py index fc1df25..1487fe8 100644 --- a/neon_api/client.py +++ b/neon_api/client.py @@ -216,7 +216,13 @@ def project(self, project_id: str) -> t.Dict[str, t.Any]: return self._request("GET", r_path) @returns_model(schema.ConnectionUri) - def connection_uri(self, project_id: str, database_name: str = None, role_name: str = None, pooled: bool = False) -> t.Dict[str, t.Any]: + def connection_uri( + self, + project_id: str, + database_name: str = None, + role_name: str = None, + pooled: bool = False, + ) -> t.Dict[str, t.Any]: """Get a connection URI for a project. :param project_id: The ID of the project. @@ -226,8 +232,12 @@ def connection_uri(self, project_id: str, database_name: str = None, role_name: More info: https://api-docs.neon.tech/reference/getconnectionuri """ - r_params = compact_mapping({"database_name": database_name, "role_name": role_name, "pooled": pooled}) - return self._request("GET", f"projects/{project_id}/connection_uri", params=r_params) + r_params = compact_mapping( + {"database_name": database_name, "role_name": role_name, "pooled": pooled} + ) + return self._request( + "GET", f"projects/{project_id}/connection_uri", params=r_params + ) @returns_model(schema.ProjectResponse) def project_create(self, **json: dict) -> t.Dict[str, t.Any]: diff --git a/pyproject.toml b/pyproject.toml index eb88001..3f39efe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "neon-api" -version = "0.1.5" +version = "0.2.0" description = "An API Client for the Neon API." authors = ["Kenneth Reitz "] license = "Apache-2.0" diff --git a/setup.py b/setup.py index 8eaf7fd..f14e4a9 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ EMAIL = "me@kennethreitz.org" AUTHOR = "Kenneth Reitz" REQUIRES_PYTHON = ">=3.9.0" -VERSION = "0.1.5" +VERSION = "0.2.0" # What packages are required for this module to be executed? REQUIRED = ["requests", "pydantic >= 2.0.0"]