This release is a pre-release and may not be stable for production use.
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.10 or
later and run the following command:
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:
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:
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:
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
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 or explore the core concepts of Prefect workflows.
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 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.
Contribute
See our documentation on contributing to Prefect.
Thanks for being part of the mission to build a new kind of workflow system and, of course, happy engineering!
Release files for prefect-client 3.8.6.dev4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prefect_client-3.8.6.dev4.tar.gz | 939.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prefect_client-3.8.6.dev4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.1 MB
Release files / prefect_client-3.8.6.dev4.tar.gz
| Download URL | prefect_client-3.8.6.dev4.tar.gz |
|---|---|
| Size | 939.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d861758484f48d932ecfbab3150377038c90cd70dc9945f39097780ae190f6c6
|
|
BLAKE2b-256 checksum How to use checksums |
e97935a42df5a1be532e9276cd4509d822dd90db77da28583420c4013eca4007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency logRelease files / prefect_client-3.8.6.dev4-py3-none-any.whl
| Download URL | prefect_client-3.8.6.dev4-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5644d0e8d976409a1af0cad97200e0f0d1135bb3a1afe16ffca5b524d95098aa
|
|
BLAKE2b-256 checksum How to use checksums |
6789fba2ae1be81be14de2434fea9096d9194a488efb02e77539e4dc07254244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency log