From 342ff1dcfde1b833132382079a6a2828092503d0 Mon Sep 17 00:00:00 2001 From: Daniele Guido Date: Mon, 27 Apr 2026 10:21:47 +0200 Subject: [PATCH 1/3] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5e08a30..d8b5b38 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ __pycache__/ impresso.egg-info/* tmp/ dist/ -site/ \ No newline at end of file +site/ +.python-version From 0f8a41525687f9e15cfe36a4a352b6164677a566 Mon Sep 17 00:00:00 2001 From: Daniele Guido Date: Mon, 27 Apr 2026 10:22:10 +0200 Subject: [PATCH 2/3] Update index.md Updated connect() example from impresso = connect() to client = connect() --- docs/index.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/index.md b/docs/index.md index 191fe0f..e5fc11a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,7 +25,7 @@ from impresso import connect client = connect() ``` -### Search +### Search ```python results = client.search.find(term="moon landing") @@ -37,20 +37,21 @@ results ```python results.df ``` + ### Pagination !!! warning "Monthly Quota" - Every Impresso user has a monthly quota of the content items they can access. - The quota is currently set at 200,000 content items. Paginating through a - large result set may see you hitting the quota limit fairly soon. - Make sure to check the size of the full result set before fetching all pages. +Every Impresso user has a monthly quota of the content items they can access. +The quota is currently set at 200,000 content items. Paginating through a +large result set may see you hitting the quota limit fairly soon. +Make sure to check the size of the full result set before fetching all pages. By default every result object is the first page of the full result set. Use the following code to go through the rest of the pages: ```python import pandas as pd # Get first page with 100 items per page -results = impresso.search.find(term="landing", limit=100) +results = client.search.find(term="landing", limit=100) print(f"Full result contains {results.total} items.") full_df = results.df @@ -73,6 +74,7 @@ result.df['text.content'][0] ``` ### See content item on Web App (shortcut) + To see a specific content item in the Web App, look for the link "See this result in the Impresso App" in the rendered result summary: ```python From 8094c45a6d986f0f180831fc5bea5a27a04aa17a Mon Sep 17 00:00:00 2001 From: Daniele Guido Date: Mon, 27 Apr 2026 10:22:40 +0200 Subject: [PATCH 3/3] Add instructions to run docs locally Add a "Run Documentation" section to README explaining how to edit files in the docs/ folder and preview changes locally. Documents the commands to install docs dependencies (poetry install --with docs), run a local dev server (poetry run mkdocs serve) and run a build check (poetry run mkdocs build), and notes the typical local URL to preview pages. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index eb4b9bf..0adedcd 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,23 @@ poetry run flake8 impresso tests poetry run mypy impresso tests ``` +### Run Documentation + +If you want to write or update the documentation (the content published on Read the Docs), edit the Markdown files in the `docs/` folder and then run the commands below to check your changes locally. + +```shell +poetry install --with docs +poetry run mkdocs serve +``` + +Open the local URL shown in the terminal (usually `http://127.0.0.1:8000`) to preview the documentation and verify that pages render correctly. + +To run a build check (the same type of check used for publication), use: + +```shell +poetry run mkdocs build +``` + ### 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`.: