mirror of
https://github.com/kennethreitz/neon-api-python.git
synced 2026-06-05 22:50:18 +00:00
Add functions to create NeonAPI instance from environment variables and token
This commit is contained in:
@@ -4,8 +4,12 @@ from .exceptions import NeonAPIError
|
|||||||
|
|
||||||
|
|
||||||
def from_environ():
|
def from_environ():
|
||||||
|
"""Create a NeonAPI instance from environment variables."""
|
||||||
|
|
||||||
return NeonAPI.from_environ()
|
return NeonAPI.from_environ()
|
||||||
|
|
||||||
|
|
||||||
def from_token(token):
|
def from_token(token):
|
||||||
|
"""Create a NeonAPI instance from a token."""
|
||||||
|
|
||||||
return NeonAPI.from_token(token)
|
return NeonAPI.from_token(token)
|
||||||
|
|||||||
Reference in New Issue
Block a user