42 lines
912 B
Markdown
42 lines
912 B
Markdown
# srgweb: Python client for SRG web services
|
|
|
|
## Installation
|
|
|
|
Install the latest version from the repository:
|
|
|
|
```bash
|
|
pip install git+https://github.com/uskovgs/srgweb/
|
|
```
|
|
|
|
## Working with https://www.srg.cosmos.ru/triton/
|
|
|
|
```python
|
|
from srgweb.triton import (
|
|
triton_session,
|
|
list_programs,
|
|
get_program,
|
|
list_baskets,
|
|
get_basket
|
|
)
|
|
import keyring
|
|
|
|
# login to triton
|
|
sess = triton_session("uskov", keyring.get_password("PLAN_SRG", ""))
|
|
# list available programs
|
|
programs = list_programs(sess)
|
|
# download program SRGA
|
|
df = get_program(sess, program="SRGA")
|
|
# list available baskets
|
|
baskets = list_baskets(sess)
|
|
# download basket ART-XC agns
|
|
df_basket = get_basket(sess, basket='ART-XC agns')
|
|
```
|
|
|
|
## Working with https://www.srg.cosmos.ru/publications/
|
|
|
|
```python
|
|
from srgweb.publications import get_srg_publications
|
|
|
|
# Get a list of publications
|
|
publications = get_srg_publications()
|
|
``` |