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.
Metadata
Release files for impresso 0.9.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| impresso-0.9.20.tar.gz | 119.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| impresso-0.9.20-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 396.7 kB
Release files / impresso-0.9.20.tar.gz
| Download URL | impresso-0.9.20.tar.gz |
|---|---|
| Size | 119.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8df570ee141ef551265aeec4e1620fb579e5ffdc3f4f53da9ec7572338badf6a
|
|
BLAKE2b-256 checksum How to use checksums |
c6f7d7dbe85464b2303e0718b5311d9f4844a55fc1f23dafe058d2e34404b11e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / impresso-0.9.20-py3-none-any.whl
| Download URL | impresso-0.9.20-py3-none-any.whl |
|---|---|
| Size | 277.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81d945ca188155b6ccaf2d68098a09a7b8fd6ccfff16c587291fec08fec6d737
|
|
BLAKE2b-256 checksum How to use checksums |
320303155f4ae0a08dfb6a3529af1cc2deb99d93f18ff0a375407552b0e264d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|