Skip to main content

A client library for the FlyFlow API

Project description

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

Create an Agent

agent = client.create_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,
   area_code='123'
)

Update an Agent

updated_agent = client.update_agent(
    agent_id=agent['id'],
    name='Updated Agent Name',
    system_prompt='Updated system prompt'
)

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:

  1. Make sure you have the latest version of setuptools and wheel installed:

    pip install --upgrade setuptools wheel
    
  2. Run the following command to build the package:

    python setup.py sdist bdist_wheel
    
  3. Install twine if you haven't already:

    pip install twine
    
  4. Upload the package to PyPI using twine:

    twine upload dist/*
    

    You will be prompted to enter your PyPI username and password.

  5. 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.

Project details


Download files

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

Source Distribution

flyflowclient-1.14.14.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

flyflowclient-1.14.14-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file flyflowclient-1.14.14.tar.gz.

File metadata

  • Download URL: flyflowclient-1.14.14.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for flyflowclient-1.14.14.tar.gz
Algorithm Hash digest
SHA256 a9f665a1304f1cc068c652d5b48ec6707807982f544dafd3391f1afa856770c8
MD5 94db98a0cd9f35f266d1d7f0c8ef932f
BLAKE2b-256 d975539b98475f2f4aba8995f582d63e365e56368446d29911c552ce2928d88d

See more details on using hashes here.

File details

Details for the file flyflowclient-1.14.14-py3-none-any.whl.

File metadata

File hashes

Hashes for flyflowclient-1.14.14-py3-none-any.whl
Algorithm Hash digest
SHA256 0eca0b3a068897b0fe77cfec1a952032650532f8d31a0819c4e80af8dbdb5c7b
MD5 0644aac4e884ec424ffea6ebee2ad3a0
BLAKE2b-256 9d46da05cf15a2e66777c2ccf500a8ff3c4b3a5aabcd6b8a1dea739c8d6cdc5d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page