A Library to interact with the Impresso API
Project description
Impresso Python Library
Impresso is a library designed to facilitate interaction with the Impresso dataset. It offers a comprehensive set of classes for API interaction and a variety of tools to streamline data manipulation and analysis.
You can find the full documentation at https://impresso.github.io/impresso-py/.
Installation
With pip:
pip install impresso
Usage
See sample notebooks in the examples/notebooks directory or examples available in the Impresso Datalab.
Extending the library
We use Poetry for dependency management. To install the package in development mode, run the following command in the root directory of the project:
poetry install
This will create and activate a virtual environment with all the dependencies installed.
Testing
poetry run pytest
Linting
poetry run pytest
poetry run flake8 impresso tests
poetry run mypy impresso tests
OpenAPI client generation
The OpenAPI client is generated using the OpenAPI Generator. Pydantic models from the OpenAPI spec are generated too. The following command generates both the client code and the pydantic models. Make sure the Public API is running on localhost.:
poetry run generate-client
Whenever the OpenAPI spec of the Impresso Public API changes, the client code and the pydantic models must be regenerated.
Protobuf
Filters used in some endpoints are serialized as a protobuf message. The protobuf message is defined in the impresso-jscommons project. The python code is generated using the protoc compiler (must be installed separately). The following command generates the python code for the protobuf message:
poetry run generate-protobuf
About Impresso
Impresso project
Impresso - Media Monitoring of the Past is an interdisciplinary research project that aims to develop and consolidate tools for processing and exploring large collections of media archives across modalities, time, languages and national borders. The first project (2017-2021) was funded by the Swiss National Science Foundation under grant No. CRSII5_173719 and the second project (2023-2027) by the SNSF under grant No. CRSII5_213585 and the Luxembourg National Research Fund under grant No. 17498891.
Copyright
Copyright (C) 2024 The Impresso team.
License
This program is provided as open source under the GNU Affero General Public License v3 or later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file impresso-0.9.14.tar.gz.
File metadata
- Download URL: impresso-0.9.14.tar.gz
- Upload date:
- Size: 95.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8cb390669b75c585913c904ff415ee438c9e79b99ae2173b4be4aca260de68
|
|
| MD5 |
9c9d6f82fa47c719613488675960ff2f
|
|
| BLAKE2b-256 |
f5630fea425cdfa9633d18e33cf98b672752b44abd15af6f51debfc10f672f1c
|
File details
Details for the file impresso-0.9.14-py3-none-any.whl.
File metadata
- Download URL: impresso-0.9.14-py3-none-any.whl
- Upload date:
- Size: 218.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb6023aaae460e0065d98582916072e1b784a4126d4e30a3109c76b537b0a6b1
|
|
| MD5 |
45ff424f79d97a370ec169602eaa2ace
|
|
| BLAKE2b-256 |
28932bddc743f6b9024a5000b9f28cd3dc8c2cc8d37a5eafae3186ae97f97fa8
|