Skip to content

Commit

Permalink
Bumps to 0.2.0 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgomes authored Jan 14, 2025
1 parent 02cc550 commit b14cfa8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
7 changes: 6 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion neon_api/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.5"
__version__ = "0.2.0"
16 changes: 13 additions & 3 deletions neon_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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]:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <me@kennethreitz.org>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit b14cfa8

Please sign in to comment.