Flyflow
Flyflow is a Python client library for interacting with the Flyflow API. It provides a simple and intuitive interface to manage agents, calls, and perform various operations related to the Flyflow platform.
Installation
You can install the Flyflow package using pip:
pip install flyflowclient
Usage
To use the Flyflow client library, you need to import the Flyflow class from the flyflow.client module:
from flyflowclient import Flyflow
client = Flyflow()
By default, the client will load the API key from the FLYFLOW_API_KEY environment variable. If you want to provide the API key explicitly, you can pass it as a parameter when creating the client instance:
client = Flyflow(api_key='your_api_key')
The default base URL for the Flyflow API is https://api.flyflow.dev/v1. If you need to use a different base URL, you can pass it as a parameter:
client = Flyflow(base_url='https://custom-api-url.com')
Agent Management
Upsert an Agent
agent = client.upsert_agent(
name='Agent Name',
system_prompt='System prompt',
initial_message='Initial message',
llm_model='gpt-3.5-turbo',
voice_id='voice_id',
webhook='https://webhook-url.com',
tools=[],
filler_words=True,
actions=[],
voicemail_number='+1234567890',
chunking=True,
endpointing=200,
voice_optimization=2
)
The upsert_agent method will create a new agent if one with the specified name doesn't exist, or update an existing agent if one with the same name already exists.
Get an Agent
agent = client.get_agent(agent_id=agent['id'])
Delete an Agent
client.delete_agent(agent_id=agent['id'])
List Agents
agents = client.list_agents(limit=10)
Call Management
Create a Call
call = client.create_call(
from_number='+1234567890',
to_number='+9876543210',
context='Call context'
)
Get a Call
call = client.get_call(call_id=call['id'])
Set Call Context
updated_call = client.set_call_context(
call_id=call['id'],
context='Updated call context'
)
List Calls
calls = client.list_calls(limit=10, agent_id=agent['id'])
Filler Words
Get Filler Words
filler_words = client.get_filler_words(text='Your text here')
For more detailed information about the available methods and their parameters, please refer to the Flyflow API documentation.
Publishing the Package
To publish the Flyflow package to PyPI, follow these steps:
-
Make sure you have the latest version of
setuptoolsandwheelinstalled:pip install --upgrade setuptools wheel -
Run the following command to build the package:
python setup.py sdist bdist_wheel -
Install
twineif you haven't already:pip install twine -
Upload the package to PyPI using
twine:twine upload dist/*You will be prompted to enter your PyPI username and password.
-
Once the upload is successful, your package will be available on PyPI, and users can install it using
pip install flyflow.
License
This project is licensed under the MIT License. See the LICENSE file for more information.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.
Metadata
Release files for flyflowclient 1.14.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flyflowclient-1.14.21.tar.gz | 7.7 kB | Without provenance | Details for flyflowclient-1.14.21.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flyflowclient-1.14.21-py3-none-any.whl | Python 3 | none | any | Details for flyflowclient-1.14.21-py3-none-any.whl |
Total release size: 17.0 kB
Release files / flyflowclient-1.14.21.tar.gz
| Download URL | flyflowclient-1.14.21.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9e4a2740787fa6c5d41a1c4f60536e52630582aa3bb9ce4d09059b104a9ea0b
|
|
BLAKE2b-256 checksum How to use checksums |
d28e9c9e0636b315d4937e79f54d531cb27b0c6467c953a4b22f386c56e69838
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.6
|
Release files / flyflowclient-1.14.21-py3-none-any.whl
| Download URL | flyflowclient-1.14.21-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c525179b25ecd2a82762549c4a3b7b61b2797a8d3f53158d0f8e74406f1b8828
|
|
BLAKE2b-256 checksum How to use checksums |
3f183b820949073299f95935b4556dc5ea95fb8b9d04466c966b6d76b3693188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.6
|
Security for flyflowclient 1.14.21
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.