Skip to main content

Function for Python

function logo

Dynamic JSON Badge

Run prediction functions (a.k.a "predictors") locally in your Python apps, with full GPU acceleration and zero dependencies.

[!TIP] Join our waitlist to bring your custom Python functions and run them on-device across Android, iOS, macOS, Linux, web, and Windows.

Installing Function

Function is distributed on PyPi. This distribution contains both the Python client and the command line interface (CLI). To install, open a terminal and run the following command:

# Install Function
$ pip install --upgrade fxn

[!NOTE] Function requires Python 3.10+

Retrieving your Access Key

Head over to fxn.ai to create an account by logging in. Once you do, generate an access key:

generate access key

Making a Prediction

First, create a Function client, specifying your access key:

from fxn import Function

# Create the Function client
fxn = Function(access_key="<Function access key>")

Then make a prediction:

# Create a prediction
prediction = fxn.predictions.create(
    tag="@fxn/greeting",
    inputs={ "name": "Peter" }
)
# Print the returned greeting
print(prediction.results[0])

Using the Function CLI

Open up a terminal and login to the Function CLI:

# Login to Function
$ fxn auth login <ACCESS KEY>

Then make a prediction:

# Make a prediction using the Function CLI
$ fxn predict @fxn/greeting --name Peter

Useful Links

Function is a product of NatML Inc.

Release files for fxn 0.0.55

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fxn 0.0.55
File Size Uploaded
fxn-0.0.55.tar.gz 830.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fxn 0.0.55
File Interpreter ABI Platform
fxn-0.0.55-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / fxn-0.0.55.tar.gz

Download URL fxn-0.0.55.tar.gz
Size 830.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9d3d5277caf2df19ee2b4d96dd73b90810ac5ff1998d5d640c3c54d21a6b1934
BLAKE2b-256 checksum
How to use checksums
2b9d5ceee0ea691ea3d22822211b455dd61e0e542a8472ef652e7553bea71215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / fxn-0.0.55-py3-none-any.whl

Download URL fxn-0.0.55-py3-none-any.whl
Size 841.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b9d18573838f72816edd61fbacda294919e50a4a74404e0e04879c61b722366
BLAKE2b-256 checksum
How to use checksums
766d1738ba54a967c005b1548b285da8e064d707de5f8b3e8ec2039321b88844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.0.55 This release

2 release files

0.0.54

2 release files

0.0.53

2 release files

0.0.52

2 release files

0.0.51

2 release files

0.0.50

2 release files

0.0.49

2 release files

0.0.48

2 release files

0.0.47

2 release files

0.0.46

2 release files

0.0.43

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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