Skip to content

Commit

Permalink
Fix RAEDME.md | Fixes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
mpol1t committed Jul 1, 2023
1 parent 43a9292 commit 718a351
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@

The gemini-public-api is an unofficial Python implementation of the public Gemini REST API. It provides a simple interface for interacting with the Gemini cryptocurrency exchange, supporting both synchronous and asynchronous communication.

## Table of Contents

1. [Installation](#installation)
2. [Usage](#usage)
- [Synchronous Usage](#synchronous-usage)
- [Asynchronous Usage](#asynchronous-usage)
3. [Dependencies](#dependencies)
4. [Contributors](#contributors)
5. [License](#license)

## Installation

Expand All @@ -45,7 +36,7 @@ print(symbols.json())

### Asynchronous Usage

The library relies on the aiohttp package for truly asynchronous execution. The ClientSession context manager is used for making async requests. Here's how to fetch the available symbols asynchronously:
The library relies on the `aiohttp` package for truly asynchronous execution. The `SessionContextManager` context manager is used for making async requests. Here's how to fetch the available symbols asynchronously:

```python
from gemini_public_api.aiohttp import api
Expand All @@ -59,14 +50,32 @@ async with SessionContextManager() as session:
print(data)
```

Alternatively, without the context manager:

```python
import aiohttp

from gemini_public_api.aiohttp import api

session = aiohttp.ClientSession()

response = await api.get_symbols(session)

async with response as resp:
data = await resp.json()
print(data)

await session.close()
```

## Dependencies

`gemini-public-api` is built with:

* [poetry](https://python-poetry.org/docs/) - A tool for dependency management and packaging in Python.
* [hypothesis](https://hypothesis.readthedocs.io/en/latest/) - A powerful, flexible, and easy-to-use library for property-based testing.
* [requests]() - The definitive library for making HTTP requests in Python.
* [aiohttp]() - An asynchronous HTTP client/server framework for asyncio and Python.
* [requests](https://docs.python-requests.org/en/latest/) - The definitive library for making HTTP requests in Python.
* [aiohttp](https://docs.aiohttp.org/en/stable/) - An asynchronous HTTP client/server framework for asyncio and Python.

## Authors

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gemini-public-api"
version = "0.10.0"
version = "0.10.1"
description = ""
authors = ["Michal Polit <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 718a351

Please sign in to comment.