Skip to content

Bumps to 0.2.0 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
@@ -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]:
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 <[email protected]>"]
license = "Apache-2.0"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
EMAIL = "[email protected]"
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"]
Loading