Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyPI

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!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prefect_client-3.8.5.dev1.tar.gz (938.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prefect_client-3.8.5.dev1-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file prefect_client-3.8.5.dev1.tar.gz.

File metadata

  • Download URL: prefect_client-3.8.5.dev1.tar.gz
  • Upload date:
  • Size: 938.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prefect_client-3.8.5.dev1.tar.gz
Algorithm Hash digest
SHA256 4c943ac7893f088c1e2b69682d4c8ec14d270f47d5a5a5d5f1baca915df17fe6
MD5 05a9c57494be3ad8a95bd36cbe3cc3b1
BLAKE2b-256 8b76ba4748e61d6a31355d70724ec0c83f9f76c20be6d6ec0a71cabc61b9543e

See more details on using hashes here.

Provenance

The following attestation bundles were made for prefect_client-3.8.5.dev1.tar.gz:

Publisher: prefect-client-publish.yaml on PrefectHQ/prefect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prefect_client-3.8.5.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for prefect_client-3.8.5.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 075381291698af6a1d1c0d9c3a49cc373d9306caa9234bf984213a42c1b4c0c0
MD5 32a577399cdf48b80ee2de119fb344d5
BLAKE2b-256 b576385f5f1c9466e1564f502b8dd905106d451779f4ddce18d125bcb5d1eadb

See more details on using hashes here.

Provenance

The following attestation bundles were made for prefect_client-3.8.5.dev1-py3-none-any.whl:

Publisher: prefect-client-publish.yaml on PrefectHQ/prefect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.8.5.dev1 This release

2 files

3.8.4

2 files

3.8.3

2 files

3.8.2

2 files

3.8.1

2 files

3.8.0

2 files

3.7.8

2 files

3.7.7

2 files

3.7.6

2 files

3.7.5

2 files

3.7.4

2 files

3.7.3

2 files

3.7.2

2 files

3.7.1

2 files

3.7.0

2 files

3.6.29

2 files

3.6.28

2 files

3.6.27

2 files

3.6.26

2 files

3.6.25

2 files

3.6.24

2 files

3.6.23

2 files

3.6.22

2 files

3.6.21

2 files

3.6.20

2 files

3.6.19

2 files

3.6.18

2 files

3.6.17

2 files

3.6.16

2 files

3.6.15

2 files

3.6.14

2 files

3.6.13

2 files

3.6.12

2 files

3.6.11

2 files

3.6.10

2 files

3.6.9

2 files

3.6.8

2 files

3.6.7

2 files

3.6.6

2 files

3.6.5

2 files

3.6.4

2 files

3.6.3

2 files

3.6.2

2 files

3.6.1

2 files

3.6.0

2 files

3.5.0

2 files

3.4.25

2 files

3.4.24

2 files

3.4.23

2 files

3.4.22

2 files

3.4.21

2 files

3.4.20

2 files

3.4.19

2 files

3.4.18

2 files

3.4.17

2 files

3.4.16

2 files

3.4.15

2 files

3.4.14

2 files

3.4.13

2 files

3.4.12

2 files

3.4.11

2 files

3.4.10

2 files

3.4.9

2 files

3.4.8

2 files

3.4.7

2 files

3.4.6

2 files

3.4.5

2 files

3.4.4

2 files

3.4.3

2 files

3.4.2

2 files

3.4.1

2 files

3.4.0

2 files

3.3.7

2 files

3.3.6

2 files

3.3.5

2 files

3.3.4

2 files

3.3.3

2 files

3.3.2

2 files

3.3.1

2 files

3.3.0

2 files

3.2.15

2 files

3.2.14

2 files

3.2.13

2 files

3.2.12

2 files

3.2.11

2 files

3.2.10

2 files

3.2.9

2 files

3.2.8

2 files

3.2.7

2 files

3.2.6

2 files

3.2.5

2 files

3.2.4

2 files

3.2.3

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.15

2 files

3.1.14

2 files

3.1.13

2 files

3.1.12

2 files

3.1.11

2 files

3.1.10

2 files

3.1.9

2 files

3.1.8

2 files

3.1.7

2 files

3.1.6

2 files

3.1.5

2 files

3.1.4

2 files

3.1.3

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

3.0.11

2 files

3.0.10

2 files

3.0.9

2 files

3.0.8

2 files

3.0.7

2 files

3.0.6

2 files

3.0.5

2 files

3.0.4

2 files

3.0.3

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.20.25

2 files

2.20.24

2 files

2.20.23

2 files

2.20.22

2 files

2.20.21

2 files

2.20.20

2 files

2.20.19

2 files

2.20.18

2 files

2.20.17

2 files

2.20.16

2 files

2.20.15

2 files

2.20.14

2 files

2.20.13

2 files

2.20.12

2 files

2.20.11

2 files

2.20.10

2 files

2.20.9

2 files

2.20.8

2 files

2.20.7

2 files

2.20.6

2 files

2.20.5

2 files

2.20.4

2 files

2.20.2

2 files

2.20.1

2 files

2.20.0

2 files

2.19.9

2 files

2.19.8

2 files

2.19.7

2 files

2.19.6

2 files

2.19.5

2 files

2.19.4

2 files

2.19.3

2 files

2.19.2

2 files

2.19.1

2 files

2.19.0

2 files

2.18.3

2 files

2.18.2

2 files

2.18.1

2 files

2.18.0

2 files

2.17.1

2 files

2.17.0

2 files

2.16.9

2 files

2.16.8

2 files

2.16.7

2 files

2.16.6

2 files

2.16.5

2 files

2.16.4

2 files

2.16.3

2 files

2.16.2

2 files

2.16.1

2 files

2.16.0

2 files

2.15.0

2 files

2.14.21

2 files

2.14.20

2 files

2.14.19

2 files

2.14.18

2 files

2.14.17

2 files

2.14.16

2 files

2.14.15

2 files

2.14.14

2 files

2.14.13

2 files

2.14.12

2 files

2.14.11

2 files

2.14.10

2 files

2.14.9

2 files

2.14.8

2 files

2.14.7

2 files

2.14.6

2 files

2.14.5

2 files

2.14.4

2 files

2.14.3

2 files

2.14.2

2 files

2.14.1

2 files

2.14.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page