Skip to content

Commit

Permalink
API-1821 Update README with instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanmartins committed Dec 5, 2023
1 parent 82058db commit a28ef93
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DISTNAME= $(shell python setup.py --name | sed 's/-/_/g' )

.PHONY: test
test: lint unittest

Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,41 @@ packages required and execute the tests for all the clients.
```bash
make test
```

Docker Setup Guide
-----------------

The Docker setup allows you to run your Python scripts inside a Docker container, with dependencies installed and files synchronized. This guide aims to facilitate the development and testing of the SDK.

### Requirements and dependencies

Ensure the following are installed on your machine:

- [Docker](https://www.docker.com/get-started/)
- [docker-compose](https://docs.docker.com/compose/)

### Initial Setup

Create a `secret.json` file by following the example provided in the project. Fill in the necessary settings based on your requirements. If you have a permanent token, only the domain and permanent_token fields need to be specified:
```
{
"domain": "https://example.bynder.com/api/",
"permanent_token": "7d09..........."
}
```

With `docker` and `docker-compose` installed, and your `secret.json` file ready, run the following command to initiate the container:
```
docker-compose up -d
```
This command initializes a container with the bynder-python-sdk installed and ready for use.

### Executing SDK Samples

Utilize the `Makefile` command to run SDK sample scripts. The syntax is as follows:
```
make executeSdkSample sample-file-name=file.py
```
All sample files are located in the `./samples` directory.

> :warning: Caution: The sample scripts are provided as examples. It is crucial to review and modify the commands before execution. The container updates automatically with changes, ensuring a seamless development experience. Always exercise caution when executing scripts.

0 comments on commit a28ef93

Please sign in to comment.