Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Update #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,9 @@ target/
.mypy_cache/

rewards-api/src/__pycache__
rewards-api/__pycache__
rewards-api/__pycache__
tmp.py
flaskApp.py
old_code
saved_models
temp.py
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ RUN mkdir rewards-api
COPY ./rewards-api rewards-api
WORKDIR "/rewards-api"
EXPOSE 8900
ENTRYPOINT [ "uvicorn", "main:app"]
CMD [ "--reload" ]
CMD ["python", "main.py"]
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
### **Rewards API**
### **Rewards API**

<br>

**rewards API** is a `REST` API where creating experiments, integrating environments and building agents are just some sets of CRUD operations and API calls. Our API internally uses [**rewards-sdk**](https://github.com/rewards-ai/rewards-SDK).
**rewards API** is a `REST` API where creating experiments, integrating environments and building agents are just some sets of CRUD operations and API calls. Our API internally uses [**rewards-sdk**](https://github.com/rewards-ai/rewards-SDK).

<br>

#### **How to run the project**
#### **How to run the project**

First clone the project by running:

```bash
git clone https://github.com/rewards-ai/rewards-api.git
```

`rewards-api` runs on `fastapi`. So install fastapi by running:
`rewards-api` runs on `flask`. So install fastapi by running:

```bash
pip install fastapi
pip install flask
```

Now for installing additional dependencies just run:
Expand All @@ -28,15 +29,14 @@ pip install -r requirements.txt
Now go to the `rewards-api` directory and run:

```
uvicorn main:app --reload
python main.py
```

This will open the the link `http://127.0.0.1:8000` and then go to `http://127.0.0.1:8000/docs/`. There you will find all the endpoints with it's instructions and curl commands after running each.

This will open the the link `http://127.0.0.1:8000` and then go to `http://127.0.0.1:8000/docs/`. There you will find all the endpoints with it's instructions and curl commands after running each.

TODO:

- [ ] Logging functionality
- [ ] Support for custom exceptions
- [ ] Support for custom exceptions
- [X] Supporting streaming the game screen
- [X] Integration with the frontend
- [X] Integration with the frontend
Loading