Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@ All notable changes to this project will be documented in this file.
- Add rate limit statistics ([#343](https://github.com/apify/apify-client-python/pull/343)) ([f35c68f](https://github.com/apify/apify-client-python/commit/f35c68ff824ce83bf9aca893589381782a1a48c7)) by [@Mantisus](https://github.com/Mantisus)


## [1.8.1](https://github.com/apify/apify-client-python/releases/tags/v1.8.1) (2024-09-17)
## [1.8.1](https://github.com/apify/apify-client-python/releases/tag/v1.8.1) (2024-09-17)

### 🐛 Bug Fixes

- Batch add requests can handle more than 25 requests ([#268](https://github.com/apify/apify-client-python/pull/268)) ([9110ee0](https://github.com/apify/apify-client-python/commit/9110ee08954762aed00ac09cd042e802c1d041f7)) by [@vdusek](https://github.com/vdusek), closes [#264](https://github.com/apify/apify-client-python/issues/264)


## [1.8.0](https://github.com/apify/apify-client-python/releases/tags/v1.8.0) (2024-08-30)
## [1.8.0](https://github.com/apify/apify-client-python/releases/tag/v1.8.0) (2024-08-30)

- drop support for Python 3.8

Expand Down Expand Up @@ -373,7 +373,7 @@ All notable changes to this project will be documented in this file.
- Start importing general constants and utilities from the `apify-shared` library


## [1.3.0](https://github.com/apify/apify-client-python/releases/tag/v1.3.0) (2023-07-24)
## [1.3.0](https://github.com/apify/apify-client-python/releases/tag/1.3.0) (2023-07-24)

### 🚀 Features

Expand Down
12 changes: 12 additions & 0 deletions scripts/postprocess_generated_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ def _collapse_blank_lines(content: str) -> str:
return re.sub(r'\n{3,}', '\n\n\n', content)


def absolutize_doc_links(content: str) -> str:
"""Rewrite root-relative Markdown links to absolute `docs.apify.com` URLs.

Descriptions come from the Apify API OpenAPI spec, where links to the Apify documentation are written
root-relative (e.g. `](/platform/...)`). Rendered under the API reference `baseUrl`, those resolve to a
non-existent `/api/client/python/platform/...` path, so prefix them with the docs domain. The negative
lookahead leaves protocol-relative `](//host)` links untouched.
"""
return re.sub(r'\]\(/(?!/)', '](https://docs.apify.com/', content)


def _ensure_typing_import(content: str, name: str) -> str:
"""Append `name` to the `from typing import ...` line if not already imported.

Expand Down Expand Up @@ -588,6 +599,7 @@ def postprocess_models(models_path: Path, literals_path: Path) -> list[Path]:
"""
original = models_path.read_text()
fixed = fix_discriminators(original)
fixed = absolutize_doc_links(fixed)
fixed = convert_enums_to_literals(fixed)
fixed = add_docs_group_decorators(fixed, 'Models')
models_content, literals_content = split_literals_to_file(fixed)
Expand Down
4 changes: 2 additions & 2 deletions src/apify_client/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class ActorDefinition(BaseModel):
storages: Storages | None = None
default_memory_mbytes: Annotated[str | int | None, Field(alias='defaultMemoryMbytes')] = None
"""
Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](/platform/actors/development/actor-definition/dynamic-actor-memory).
Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](https://docs.apify.com/platform/actors/development/actor-definition/dynamic-actor-memory).
"""
min_memory_mbytes: Annotated[int | None, Field(alias='minMemoryMbytes', ge=128)] = None
"""
Expand Down Expand Up @@ -828,7 +828,7 @@ class Dataset(BaseModel):
),
] = None
"""
Defines the schema of items in your dataset, the full specification can be found in [Apify docs](/platform/actors/development/actor-definition/dataset-schema)
Defines the schema of items in your dataset, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema)
"""
console_url: Annotated[
AnyUrl, Field(alias='consoleUrl', examples=['https://console.apify.com/storage/datasets/27TmTznX9YPeAYhkC'])
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-0.6/api-typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20562,7 +20562,7 @@
"version_number": "Actor version number to be built.",
"beta_packages": "If True, then the actor is built with beta versions of Apify NPM packages.\nBy default, the build uses latest stable packages.",
"tag": "Tag to be applied to the build on success. By default, the tag is taken from the actor version's buildTag property.",
"use_cache": "If true, the actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/`leverage`-build-cache).\nThis is to enable quick rebuild during development.\nBy default, the cache is not used.",
"use_cache": "If true, the actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache).\nThis is to enable quick rebuild during development.\nBy default, the cache is not used.",
"wait_for_finish": "The maximum number of seconds the server waits for the build to finish before returning.\nBy default it is 0, the maximum value is 300.\n"
},
"returns": "dict: The build object"
Expand Down Expand Up @@ -20692,7 +20692,7 @@
"summary": [
{
"kind": "text",
"text": "If true, the actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/`leverage`-build-cache).\nThis is to enable quick rebuild during development.\nBy default, the cache is not used."
"text": "If true, the actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache).\nThis is to enable quick rebuild during development.\nBy default, the cache is not used."
}
]
},
Expand Down
16 changes: 8 additions & 8 deletions website/versioned_docs/version-1.12/api-typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24356,7 +24356,7 @@
"summary": [
{
"kind": "text",
"text": "Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](/platform/actors/development/actor-definition/dynamic-actor-memory)."
"text": "Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](https://docs.apify.com/platform/actors/development/actor-definition/dynamic-actor-memory)."
}
]
},
Expand All @@ -24366,7 +24366,7 @@
"module": "_models",
"name": "default_memory_mbytes",
"parsedDocstring": {
"text": "Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](/platform/actors/development/actor-definition/dynamic-actor-memory)."
"text": "Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](https://docs.apify.com/platform/actors/development/actor-definition/dynamic-actor-memory)."
},
"sources": [
{
Expand Down Expand Up @@ -38481,7 +38481,7 @@
"summary": [
{
"kind": "text",
"text": "Defines the schema of items in your dataset, the full specification can be found in [Apify docs](/platform/actors/development/actor-definition/dataset-schema)"
"text": "Defines the schema of items in your dataset, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema)"
}
]
},
Expand All @@ -38491,7 +38491,7 @@
"module": "_models",
"name": "schema_",
"parsedDocstring": {
"text": "Defines the schema of items in your dataset, the full specification can be found in [Apify docs](/platform/actors/development/actor-definition/dataset-schema)"
"text": "Defines the schema of items in your dataset, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema)"
},
"sources": [
{
Expand Down Expand Up @@ -73153,7 +73153,7 @@
"version_number": "Actor version number to be built.",
"beta_packages": "If True, then the Actor is built with beta versions of Apify NPM packages. By default,\nthe build uses latest stable packages.",
"tag": "Tag to be applied to the build on success. By default, the tag is taken from the Actor version's\nbuild tag property.",
"use_cache": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/`leverage`-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used.",
"use_cache": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used.",
"wait_for_finish": "The maximum number of seconds the server waits for the build to finish before returning.\nBy default it is 0, the maximum value is 60.",
"timeout": "Timeout for the API HTTP request.\n"
},
Expand Down Expand Up @@ -73292,7 +73292,7 @@
"summary": [
{
"kind": "text",
"text": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/`leverage`-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used."
"text": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used."
}
]
},
Expand Down Expand Up @@ -76821,7 +76821,7 @@
"version_number": "Actor version number to be built.",
"beta_packages": "If True, then the Actor is built with beta versions of Apify NPM packages. By default,\nthe build uses latest stable packages.",
"tag": "Tag to be applied to the build on success. By default, the tag is taken from the Actor version's\nbuild tag property.",
"use_cache": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/`leverage`-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used.",
"use_cache": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used.",
"wait_for_finish": "The maximum number of seconds the server waits for the build to finish before returning.\nBy default it is 0, the maximum value is 60.",
"timeout": "Timeout for the API HTTP request.\n"
},
Expand Down Expand Up @@ -76962,7 +76962,7 @@
"summary": [
{
"kind": "text",
"text": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/`leverage`-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used."
"text": "If true, the Actor's Docker container will be rebuilt using layer cache\n(https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache).\nThis is to enable quick rebuild during development. By default, the cache is not used."
}
]
},
Expand Down
Loading