Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

Commit 812b17e

Browse files
committed
feat: deprecate the apify-shared package
1 parent cdf436b commit 812b17e

6 files changed

Lines changed: 47 additions & 9 deletions

File tree

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Development
22

3+
> ⚠️ This package is deprecated and archived - see the [README](README.md). New features and dependency updates are
4+
> not accepted anymore; the guide below is kept only in case the project is revived.
5+
36
Here you'll find a contributing guide to get started with development.
47

58
## Environment

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
# Apify Shared Python
22

3-
The `apify-shared-python` is a Python library for containing constants and utilities which are used across
4-
our other Python projects like [apify-client-python](https://github.com/apify/apify-client-python)
5-
and [apify-sdk-python](https://github.com/apify/apify-sdk-python).
3+
> ⚠️ **DEPRECATED - this package is no longer maintained.**
4+
>
5+
> The `apify-shared` package is not used by any Apify Python library anymore - its constants and utilities were moved
6+
> into the packages that need them. Already published versions stay installable from PyPI, but there will be no
7+
> further releases, bug fixes, or security updates, and this repository has been archived.
68
7-
If you want to develop Apify Actors in Python,
8-
check out the [Apify SDK for Python](https://docs.apify.com/sdk/python) instead.
9+
## What to use instead
10+
11+
- The [Apify SDK for Python](https://docs.apify.com/sdk/python) (the `apify` package) exposes the Actor constants,
12+
such as `ActorEnvVars`, `ApifyEnvVars`, `ActorEventTypes`, and `WebhookEventType`.
13+
- The [Apify API client for Python](https://docs.apify.com/api/client/python) (the `apify-client` package) provides
14+
fully typed models and literals for the API resources it works with.
15+
16+
The signing helpers (`encode_base62`, `create_hmac_signature`, and `create_storage_content_signature`) have no public
17+
replacement - they are an implementation detail of the packages above. Copy them into your own project if you depend
18+
on them.
19+
20+
If you want to develop Apify Actors in Python, check out the [Apify SDK for Python](https://docs.apify.com/sdk/python).
921

1022
## Installation
1123

1224
Requires Python 3.10+
1325

14-
You can install the package from its [PyPI listing](https://pypi.org/project/apify-shared).
15-
To do that, simply run `pip install apify-shared` in your terminal.
26+
The last published version is still available on its [PyPI listing](https://pypi.org/project/apify-shared), so
27+
existing installations keep working. Importing the package emits a `DeprecationWarning`. Do not add it to new projects.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ build-backend = "uv_build"
55
[project]
66
name = "apify_shared"
77
version = "2.2.2"
8-
description = "Tools and constants shared across Apify projects."
8+
description = "DEPRECATED - Tools and constants shared across Apify projects."
99
authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
1010
license = "Apache-2.0"
1111
license-files = ["LICENSE"]
1212
readme = "README.md"
1313
requires-python = ">=3.10"
1414
classifiers = [
15-
"Development Status :: 5 - Production/Stable",
15+
"Development Status :: 7 - Inactive",
1616
"Environment :: Console",
1717
"Intended Audience :: Developers",
1818
"Operating System :: OS Independent",

renovate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"enabled": false,
23
"extends": ["config:base", ":semanticCommitTypeAll(chore)"],
34
"ignorePaths": ["docs/**"],
45
"pinVersions": false,

src/apify_shared/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
import warnings
12
from importlib import metadata
23

34
__version__ = metadata.version('apify-shared')
5+
6+
warnings.warn(
7+
'The `apify-shared` package is deprecated and no longer maintained. Its constants and utilities now live in the '
8+
'packages that need them: use `apify` (the Apify SDK for Python) or `apify-client` (the Apify API client for '
9+
'Python) instead. See https://github.com/apify/apify-shared-python for details.',
10+
DeprecationWarning,
11+
stacklevel=2,
12+
)

tests/unit/test_deprecation.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from __future__ import annotations
2+
3+
import importlib
4+
5+
import pytest
6+
7+
import apify_shared
8+
9+
10+
def test_import_emits_deprecation_warning() -> None:
11+
"""Importing the package warns that it is deprecated and points to the replacements."""
12+
with pytest.warns(DeprecationWarning, match='`apify-shared` package is deprecated'):
13+
importlib.reload(apify_shared)

0 commit comments

Comments
 (0)