Metadata-Version: 2.4
Name: prefect-client
Version: 3.4.23
Summary: Workflow orchestration and management.
Project-URL: Changelog, https://github.com/PrefectHQ/prefect/releases
Project-URL: Documentation, https://docs.prefect.io
Project-URL: Source, https://github.com/PrefectHQ/prefect
Project-URL: Tracker, https://github.com/PrefectHQ/prefect/issues
Author-email: "Prefect Technologies, Inc." <help@prefect.io>
License: Apache-2.0
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: <3.14,>=3.9
Requires-Dist: anyio<5.0.0,>=4.4.0
Requires-Dist: asgi-lifespan<3.0,>=1.0
Requires-Dist: cachetools<7.0,>=5.3
Requires-Dist: cloudpickle<4.0,>=2.0
Requires-Dist: coolname<3.0.0,>=1.0.4
Requires-Dist: dateparser<2.0.0,>=1.1.1
Requires-Dist: exceptiongroup>=1.0.0
Requires-Dist: fastapi<1.0.0,>=0.111.0
Requires-Dist: fsspec>=2022.5.0
Requires-Dist: graphviz>=0.20.1
Requires-Dist: griffe<2.0.0,>=0.49.0
Requires-Dist: httpcore<2.0.0,>=1.0.5
Requires-Dist: httpx[http2]!=0.23.2,>=0.23
Requires-Dist: humanize<5.0.0,>=4.9.0
Requires-Dist: importlib-metadata>=4.4; python_version < '3.10'
Requires-Dist: jsonpatch<2.0,>=1.32
Requires-Dist: jsonschema<5.0.0,>=4.18.0
Requires-Dist: opentelemetry-api<2.0.0,>=1.27.0
Requires-Dist: orjson<4.0,>=3.7
Requires-Dist: packaging<25.1,>=21.3
Requires-Dist: pathspec>=0.8.0
Requires-Dist: pendulum<4,>=3.0.0; python_version < '3.13'
Requires-Dist: prometheus-client>=0.20.0
Requires-Dist: pydantic!=2.11.0,!=2.11.1,!=2.11.2,!=2.11.3,!=2.11.4,<3.0.0,>=2.10.1
Requires-Dist: pydantic-core<3.0.0,>=2.12.0
Requires-Dist: pydantic-extra-types<3.0.0,>=2.8.2
Requires-Dist: pydantic-settings!=2.9.0,<3.0.0,>2.2.1
Requires-Dist: python-dateutil<3.0.0,>=2.8.2
Requires-Dist: python-slugify<9.0,>=5.0
Requires-Dist: python-socks[asyncio]<3.0,>=2.5.3
Requires-Dist: pytz<2026,>=2021.1
Requires-Dist: pyyaml<7.0.0,>=5.4.1
Requires-Dist: rfc3339-validator<0.2.0,>=0.1.4
Requires-Dist: rich<15.0,>=11.0
Requires-Dist: ruamel-yaml>=0.17.0
Requires-Dist: sniffio<2.0.0,>=1.3.0
Requires-Dist: toml>=0.10.0
Requires-Dist: typing-extensions<5.0.0,>=4.10.0
Requires-Dist: uvicorn!=0.29.0,>=0.14.0
Requires-Dist: websockets<16.0,>=13.0
Requires-Dist: whenever<0.10.0,>=0.7.3; python_version >= '3.13'
Provides-Extra: notifications
Requires-Dist: apprise<2.0.0,>=1.1.0; extra == 'notifications'
Description-Content-Type: text/markdown

<p align="center"><img src="https://github.com/PrefectHQ/prefect/assets/3407835/c654cbc6-63e8-4ada-a92a-efd2f8f24b85" width=1000></p>

<p align="center">
    <a href="https://pypi.python.org/pypi/prefect-client/" alt="PyPI version">
        <img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-client?color=0052FF&labelColor=090422"></a>
    <a href="https://github.com/prefecthq/prefect/" alt="Stars">
        <img src="https://img.shields.io/github/stars/prefecthq/prefect?color=0052FF&labelColor=090422" /></a>
    <a href="https://pepy.tech/badge/prefect-client/" alt="Downloads">
        <img src="https://img.shields.io/pypi/dm/prefect-client?color=0052FF&labelColor=090422" /></a>
    <a href="https://github.com/prefecthq/prefect/pulse" alt="Activity">
        <img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect?color=0052FF&labelColor=090422" /></a>
    <br>
    <a href="https://prefect.io/slack" alt="Slack">
        <img src="https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack" /></a>
    <a href="https://www.youtube.com/c/PrefectIO/" alt="YouTube">
        <img src="https://img.shields.io/badge/youtube-watch_videos-red.svg?color=0052FF&labelColor=090422&logo=youtube" /></a>
</p>

# prefect-client

The `prefect-client` package is a minimal-installation of `prefect` which is designed for interacting with Prefect Cloud
or remote any `prefect` server. It sheds some functionality and dependencies in exchange for a smaller installation size,
making it ideal for use in lightweight or ephemeral environments. These characteristics make it ideal for use in lambdas
or other resource-constrained environments.


## Getting started

`prefect-client` shares the same installation requirements as prefect. To install, make sure you are on Python 3.9 or
later and run the following command:

```bash
pip install prefect-client
```

Next, ensure that your `prefect-client` has access to a remote `prefect` server by exporting the `PREFECT_API_KEY`
(if using Prefect Cloud) and `PREFECT_API_URL` environment variables. Once those are set, use the package in your code as
you would normally use `prefect`!


For example, to remotely trigger a run a deployment:

```python
from prefect.deployments import run_deployment


def my_lambda(event):
    ...
    run_deployment(
        name="my-flow/my-deployment",
        parameters={"foo": "bar"},
        timeout=0,
    )

my_lambda({})
```

To emit events in an event driven system:

```python
from prefect.events import emit_event


def something_happened():
    emit_event("my-event", resource={"prefect.resource.id": "foo.bar"})

something_happened()
```


Or just interact with a `prefect` API:
```python
from prefect.client.orchestration import get_client


async def query_api():
    async with get_client() as client:
        limits = await client.read_concurrency_limits(limit=10, offset=0)
        print(limits)


query_api()
```


## Known limitations
By design, `prefect-client` omits all CLI and server components. This means that the CLI is not available for use
and attempts to access server objects will fail. Furthermore, some classes, methods, and objects may be available
for import in `prefect-client` but may not be "runnable" if they tap into server-oriented functionality. If you
encounter such a limitation, feel free to [open an issue](https://github.com/PrefectHQ/prefect/issues/new/choose)
describing the functionality you are interested in using and we will do our best to make it available.


## Next steps

There's lots more you can do to orchestrate and observe your workflows with Prefect!
Start with our [friendly tutorial](https://docs.prefect.io/tutorials) or explore the [core concepts of Prefect workflows](https://docs.prefect.io/concepts/).

## Join the community

Prefect is made possible by the fastest growing community of thousands of friendly data engineers. Join us in building a new kind of workflow system. 
The [Prefect Slack community](https://prefect.io/slack) is a fantastic place to learn more about Prefect, ask questions, or get help with workflow design. 
All community forums, including code contributions, issue discussions, and Slack messages are subject to our [Code of Conduct](https://github.com/PrefectHQ/prefect/blob/main/CODE_OF_CONDUCT.md).

## Contribute

See our [documentation on contributing to Prefect](https://docs.prefect.io/contributing/overview/).

Thanks for being part of the mission to build a new kind of workflow system and, of course, **happy engineering!**
