Skip to content

Commit d3afb4a

Browse files
Fir 8526 replace management api readme.m (#28)
* rearrange readmes * fix links
1 parent 62d2339 commit d3afb4a

File tree

5 files changed

+65
-63
lines changed

5 files changed

+65
-63
lines changed

README.md

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,28 @@
11
# firebolt-sdk
2-
32
### Installation
43

54
* Requires Python `>=3.9`
65
* `pip install firebolt-sdk`
76

8-
### Usage
9-
10-
See: [examples.ipynb](examples.ipynb).
11-
12-
### Configuration
13-
14-
To use the SDK, you generally will want to set the following environment variables:
15-
```
16-
FIREBOLT_USER='[email protected]'
17-
FIREBOLT_PASSWORD='*****'
18-
FIREBOLT_SERVER='api.app.firebolt.io'
19-
FIREBOLT_DEFAULT_REGION='us-east-1'
20-
```
21-
22-
* You can store these in a `.env` file
23-
* environment variables on your system always take precedence over those in `.env`
247

25-
Once the environment variables are defined (either on your system or in `.env`),
26-
you can initialize a ResourceManager with:
8+
## Connection parameters
9+
These parameters are used to connect to a Firebolt database:
10+
- **engine_url** - url for an engine to make requests to. Can be retrieved from Web UI, or from [engine](https://github.com/firebolt-db/firebolt-sdk/tree/master/src/firebolt/model/engine.py) attribute `endpoint`
11+
- **database** - name of the database to make queries to
12+
- **username** - account username
13+
- **password** - account password
2714

28-
```python
29-
from firebolt.service.manager import ResourceManager
15+
Optional parameters
16+
- **api_endpoint** - api hostname for logging in. Defaults to `api.app.firebolt.io`.
3017

31-
rm = ResourceManager()
32-
print(rm.regions.default_region) # see your default region
33-
```
18+
## Examples
19+
See [PEP-249](https://www.python.org/dev/peps/pep-0249) for the DB API reference and specifications. An example [jupyter notebook](https://github.com/firebolt-db/firebolt-sdk/tree/master/examples/dbapi.ipynb) is included to illustrate the use of the Firebolt API.
3420

35-
Or you can configure settings manually:
36-
37-
```python
38-
from firebolt.service.manager import ResourceManager
39-
from firebolt.common.settings import Settings
40-
from pydantic import SecretStr
41-
42-
rm = ResourceManager(settings=Settings(
43-
server="api.app.firebolt.io",
44-
45-
password=SecretStr("*****"),
46-
default_region="us-east-1",
47-
))
48-
print(rm.client.account_id) # see your account id
49-
```
21+
### Contributing
5022

51-
Under the hood, configuration works via Pydantic,
52-
see [here](https://pydantic-docs.helpmanual.io/usage/settings/).
23+
See: [CONTRIBUTING.MD](https://github.com/firebolt-db/firebolt-sdk/tree/master/CONTRIBUTING.MD)
5324

54-
### Contributing
25+
## License
26+
The Firebolt DB API is licensed under the [Apache License Version 2.0](https://github.com/firebolt-db/firebolt-sdk/tree/master/LICENSE) software license.
5527

56-
See: [CONTRIBUTING.MD](CONTRIBUTING.MD)
28+
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>

README_MANAGEMENT.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Resource Management
2+
### Usage
3+
4+
See: [examples.ipynb](https://github.com/firebolt-db/firebolt-sdk/tree/master/examples/management.ipynb).
5+
6+
### Configuration
7+
8+
To use the SDK, you generally will want to set the following environment variables:
9+
```
10+
FIREBOLT_USER='[email protected]'
11+
FIREBOLT_PASSWORD='*****'
12+
FIREBOLT_SERVER='api.app.firebolt.io'
13+
FIREBOLT_DEFAULT_REGION='us-east-1'
14+
```
15+
16+
* You can store these in a `.env` file
17+
* environment variables on your system always take precedence over those in `.env`
18+
19+
Once the environment variables are defined (either on your system or in `.env`),
20+
you can initialize a ResourceManager with:
21+
22+
```python
23+
from firebolt.service.manager import ResourceManager
24+
25+
rm = ResourceManager()
26+
print(rm.regions.default_region) # see your default region
27+
```
28+
29+
Or you can configure settings manually:
30+
31+
```python
32+
from firebolt.service.manager import ResourceManager
33+
from firebolt.common.settings import Settings
34+
from pydantic import SecretStr
35+
36+
rm = ResourceManager(settings=Settings(
37+
server="api.app.firebolt.io",
38+
39+
password=SecretStr("*****"),
40+
default_region="us-east-1",
41+
))
42+
print(rm.client.account_id) # see your account id
43+
```
44+
45+
Under the hood, configuration works via Pydantic,
46+
see [here](https://pydantic-docs.helpmanual.io/usage/settings/).
47+
48+
### Contributing
49+
50+
See: [CONTRIBUTING.MD](https://github.com/firebolt-db/firebolt-sdk/tree/master/CONTRIBUTING.MD)
File renamed without changes.
File renamed without changes.

src/firebolt/db/README.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)