mirror of
https://github.com/kennethreitz/neon-api-python.git
synced 2026-06-05 22:50:18 +00:00
Update README.md
This commit is contained in:
@@ -30,30 +30,30 @@ $ pip install neon-client
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```python
|
```python
|
||||||
>>> from neon_client import NeonClient
|
>>> from neon_client import NeonAPI
|
||||||
|
|
||||||
>>> neon = NeonClient(api_key='your_api_key')
|
>>> neon = NeonAPI(api_key='your_api_key')
|
||||||
|
|
||||||
# List all the API keys.
|
# List all the API keys.
|
||||||
>>> api_keys = neon.api_keys()
|
>>> api_keys = neon.api_keys()
|
||||||
|
|
||||||
# Get a specific API key.
|
# Get a specific API key.
|
||||||
>>> api_key = neon.api_key(api_key_id='your_api_key_id')
|
>>> api_key = neon.api_key('your_api_key_id')
|
||||||
|
|
||||||
# Get all the projects
|
# Get all the projects
|
||||||
>>> projects = neon.projects()
|
>>> projects = neon.projects()
|
||||||
|
|
||||||
# Get a specific project
|
# Get a specific project
|
||||||
>>> project = neon.project(project_id='your_project_id')
|
>>> project = neon.project('your_project_id')
|
||||||
|
|
||||||
# Get all the databases
|
# Get all the databases
|
||||||
>>> databases = neon.databases()
|
>>> databases = neon.databases()
|
||||||
|
|
||||||
# Get a specific database
|
# Get a specific database
|
||||||
>>> database = neon.database(database_id='your_database_id')
|
>>> database = neon.database('your_database_id')
|
||||||
|
|
||||||
# Get all the branches for a given database.
|
# Get all the branches for a given database.
|
||||||
>>> branches = neon.branches(database_id='your_database_id')
|
>>> branches = neon.branches(your_database_id')
|
||||||
|
|
||||||
# Get a specific branch
|
# Get a specific branch
|
||||||
>>> branch = neon.branch(database_id='your_database_id', branch_id='your_branch_id')
|
>>> branch = neon.branch(database_id='your_database_id', branch_id='your_branch_id')
|
||||||
|
|||||||
Reference in New Issue
Block a user