v0.1.0
This commit is contained in:
62
README.md
62
README.md
@@ -1,3 +1,63 @@
|
||||
# apify-shared
|
||||
|
||||
Shared utility package for use with Apify actors
|
||||
Shared utility package for use with Apify actors.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
```
|
||||
|
||||
## Project structure
|
||||
|
||||
```
|
||||
src/apify_shared/ # library source code
|
||||
pyproject.toml # package metadata and dependencies
|
||||
uv.lock # pinned dependency versions
|
||||
.python-version # pinned Python version (3.12)
|
||||
```
|
||||
|
||||
Add new modules under `src/apify_shared/` and re-export from `__init__.py` to expose them as part of the public API.
|
||||
|
||||
## Managing dependencies
|
||||
|
||||
```bash
|
||||
uv add httpx # add a runtime dependency
|
||||
uv add --dev pytest # add a dev-only dependency
|
||||
uv remove httpx # remove a dependency
|
||||
|
||||
uv lock --upgrade # upgrade all dependencies to latest
|
||||
uv lock --upgrade-package httpx # upgrade a single package
|
||||
uv sync # install/update local venv from lock file
|
||||
```
|
||||
|
||||
## Using as a dependency in another project
|
||||
|
||||
### From Gitea (recommended)
|
||||
|
||||
In the consuming project's `pyproject.toml`:
|
||||
|
||||
```toml
|
||||
[project]
|
||||
dependencies = ["apify-shared"]
|
||||
|
||||
[tool.uv.sources]
|
||||
apify-shared = { git = "https://your-gitea-instance.com/virtek-labs/apify-shared" }
|
||||
```
|
||||
|
||||
Pin to a specific tag, branch, or commit:
|
||||
|
||||
```toml
|
||||
apify-shared = { git = "https://your-gitea-instance.com/virtek-labs/apify-shared", tag = "v0.1.0" }
|
||||
apify-shared = { git = "https://your-gitea-instance.com/virtek-labs/apify-shared", branch = "main" }
|
||||
apify-shared = { git = "https://your-gitea-instance.com/virtek-labs/apify-shared", rev = "abc123" }
|
||||
```
|
||||
|
||||
### From a local path (development)
|
||||
|
||||
```toml
|
||||
[tool.uv.sources]
|
||||
apify-shared = { path = "../apify-shared", editable = true }
|
||||
```
|
||||
|
||||
Then run `uv sync` in the consuming project.
|
||||
|
||||
Reference in New Issue
Block a user