Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cachitas committed Mar 31, 2024
1 parent 97a746e commit 5a2c3f2
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# STRINGX

STRINGX is a [STRING](string-db.org) API client using [HTTPX](https://www.python-httpx.org)
STRINGX is a [STRING](https://string-db.org) API client using [HTTPX](https://www.python-httpx.org).

## Install

Expand All @@ -12,8 +12,28 @@ pip install stringx

```python
import stringx
```

You can call API endpoints directly

```python
identifiers = stringx.map_identifiers(["edin", "atta"], species=7227)
```

or instantiate a customized client where you can specify the API version or your *caller identity*.

with stringx.Client() as client:

```python
import stringx

with stringx.Client(base_url="https://version-11-0.string-db.org") as client:
identifiers = client.map_identifiers(["edin", "atta"], species=7227)

```

### API Endpoints

| Method | API URL | **stringx** |
| -------------------------------- | ------------------------------- | ------------------------ |
| Mapping identifiers | /api/json/get_string_ids? | `map_identifiers()` |
| Getting the interaction partners | /api/json/interaction_partners? | `interaction_partners()` |

0 comments on commit 5a2c3f2

Please sign in to comment.