-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c16932
commit 9dc4f89
Showing
224 changed files
with
5,916 additions
and
1,878 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Python SDK", | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", | ||
"postCreateCommand": "pip3 install --user -r requirements.txt && cd example && sh install.sh", | ||
"customizations": { | ||
"codespaces":{ | ||
"openFiles": ["examples/sample.py", "examples/README.md"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# doppler-sdk-example | ||
A basic example of how to use the doppler-sdk package. | ||
|
||
## Installation | ||
|
||
If `doppler-sdk` is published to pypi: | ||
```sh | ||
pip install doppler-sdk==1.1.2 | ||
``` | ||
|
||
In the event `doppler-sdk` is not published to pypi, you can install it locally by running the following command in the example folder: | ||
```sh | ||
. ./install.sh | ||
``` | ||
|
||
This will create and start a virtual environment and install the package locally in it. | ||
|
||
To close the virtual environment run: | ||
```sh | ||
deactivate | ||
``` | ||
|
||
To re-activate the virtual environment once it is installed run: | ||
```sh | ||
source .venv/bin/activate | ||
``` | ||
|
||
## Usage | ||
|
||
To run the example, run the following command in the examples folder: | ||
```sh | ||
python sample.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
python -m venv .venv | ||
source .venv/bin/activate | ||
pip install build | ||
python -m build --outdir dist ../ | ||
pip install dist/doppler_sdk-1.1.2-py3-none-any.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
pip3 install build | ||
python3 -m build --outdir dist ../ | ||
pip3 install dist/doppler_sdk-1.1.2-py3-none-any.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from pprint import pprint | ||
from dopplersdk import DopplerSDK | ||
|
||
DOPPLERSDK_ACCESS_TOKEN = "" | ||
|
||
sdk = DopplerSDK() | ||
sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) | ||
|
||
results = sdk.projects.list() | ||
|
||
pprint(vars(results)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.