flyflowclient


Nameflyflowclient JSON
Version 1.14.21 PyPI version JSON
download
home_pagehttps://github.com/flyflow-devs/flyflow-python
SummaryA client library for the FlyFlow API
upload_time2024-08-01 18:23:30
maintainerNone
docs_urlNone
authorCarl Cortright
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```python
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:

```python
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:

```python
client = Flyflow(base_url='https://custom-api-url.com')
```

### Agent Management

#### Upsert an Agent

```python
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

```python
agent = client.get_agent(agent_id=agent['id'])
```

#### Delete an Agent

```python
client.delete_agent(agent_id=agent['id'])
```

#### List Agents

```python
agents = client.list_agents(limit=10)
```

### Call Management

#### Create a Call

```python
call = client.create_call(
    from_number='+1234567890',
    to_number='+9876543210',
    context='Call context'
)
```

#### Get a Call

```python
call = client.get_call(call_id=call['id'])
```

#### Set Call Context

```python
updated_call = client.set_call_context(
   call_id=call['id'],
   context='Updated call context'
)
```

#### List Calls

```python
calls = client.list_calls(limit=10, agent_id=agent['id'])
```

### Filler Words

#### Get Filler Words

```python
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](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](https://github.com/your-username/flyflow).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flyflow-devs/flyflow-python",
    "name": "flyflowclient",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Carl Cortright",
    "author_email": "carl@flyflow.dev",
    "download_url": "https://files.pythonhosted.org/packages/d2/8e/9c9e0636b315d4937e79f54d531cb27b0c6467c953a4b22f386c56e69838/flyflowclient-1.14.21.tar.gz",
    "platform": null,
    "description": "# Flyflow\n\nFlyflow 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.\n\n## Installation\n\nYou can install the Flyflow package using pip:\n\n```\npip install flyflowclient\n```\n\n## Usage\n\nTo use the Flyflow client library, you need to import the `Flyflow` class from the `flyflow.client` module:\n\n```python\nfrom flyflowclient import Flyflow\n\nclient = Flyflow()\n```\n\nBy 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:\n\n```python\nclient = Flyflow(api_key='your_api_key')\n```\n\nThe 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:\n\n```python\nclient = Flyflow(base_url='https://custom-api-url.com')\n```\n\n### Agent Management\n\n#### Upsert an Agent\n\n```python\nagent = client.upsert_agent(\n   name='Agent Name',\n   system_prompt='System prompt',\n   initial_message='Initial message',\n   llm_model='gpt-3.5-turbo',\n   voice_id='voice_id',\n   webhook='https://webhook-url.com',\n   tools=[],\n   filler_words=True,\n   actions=[],\n   voicemail_number='+1234567890',\n   chunking=True,\n   endpointing=200,\n   voice_optimization=2\n)\n```\n\nThe `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.\n\n#### Get an Agent\n\n```python\nagent = client.get_agent(agent_id=agent['id'])\n```\n\n#### Delete an Agent\n\n```python\nclient.delete_agent(agent_id=agent['id'])\n```\n\n#### List Agents\n\n```python\nagents = client.list_agents(limit=10)\n```\n\n### Call Management\n\n#### Create a Call\n\n```python\ncall = client.create_call(\n    from_number='+1234567890',\n    to_number='+9876543210',\n    context='Call context'\n)\n```\n\n#### Get a Call\n\n```python\ncall = client.get_call(call_id=call['id'])\n```\n\n#### Set Call Context\n\n```python\nupdated_call = client.set_call_context(\n   call_id=call['id'],\n   context='Updated call context'\n)\n```\n\n#### List Calls\n\n```python\ncalls = client.list_calls(limit=10, agent_id=agent['id'])\n```\n\n### Filler Words\n\n#### Get Filler Words\n\n```python\nfiller_words = client.get_filler_words(text='Your text here')\n```\n\nFor more detailed information about the available methods and their parameters, please refer to the Flyflow API documentation.\n\n## Publishing the Package\n\nTo publish the Flyflow package to PyPI, follow these steps:\n\n1. Make sure you have the latest version of `setuptools` and `wheel` installed:\n   ```\n   pip install --upgrade setuptools wheel\n   ```\n\n2. Run the following command to build the package:\n   ```\n   python setup.py sdist bdist_wheel\n   ```\n\n3. Install `twine` if you haven't already:\n   ```\n   pip install twine\n   ```\n\n4. Upload the package to PyPI using `twine`:\n   ```\n   twine upload dist/*\n   ```\n\n   You will be prompted to enter your PyPI username and password.\n\n5. Once the upload is successful, your package will be available on PyPI, and users can install it using `pip install flyflow`.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.\n\n## Contributing\n\nContributions 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](https://github.com/your-username/flyflow).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A client library for the FlyFlow API",
    "version": "1.14.21",
    "project_urls": {
        "Homepage": "https://github.com/flyflow-devs/flyflow-python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f183b820949073299f95935b4556dc5ea95fb8b9d04466c966b6d76b3693188",
                "md5": "ccd356ec9a6d0255010249fa46719949",
                "sha256": "c525179b25ecd2a82762549c4a3b7b61b2797a8d3f53158d0f8e74406f1b8828"
            },
            "downloads": -1,
            "filename": "flyflowclient-1.14.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ccd356ec9a6d0255010249fa46719949",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9343,
            "upload_time": "2024-08-01T18:23:28",
            "upload_time_iso_8601": "2024-08-01T18:23:28.888336Z",
            "url": "https://files.pythonhosted.org/packages/3f/18/3b820949073299f95935b4556dc5ea95fb8b9d04466c966b6d76b3693188/flyflowclient-1.14.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d28e9c9e0636b315d4937e79f54d531cb27b0c6467c953a4b22f386c56e69838",
                "md5": "8f32c7adb5c98d3eb066fb5c7f2ac26c",
                "sha256": "b9e4a2740787fa6c5d41a1c4f60536e52630582aa3bb9ce4d09059b104a9ea0b"
            },
            "downloads": -1,
            "filename": "flyflowclient-1.14.21.tar.gz",
            "has_sig": false,
            "md5_digest": "8f32c7adb5c98d3eb066fb5c7f2ac26c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7704,
            "upload_time": "2024-08-01T18:23:30",
            "upload_time_iso_8601": "2024-08-01T18:23:30.984168Z",
            "url": "https://files.pythonhosted.org/packages/d2/8e/9c9e0636b315d4937e79f54d531cb27b0c6467c953a4b22f386c56e69838/flyflowclient-1.14.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-01 18:23:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flyflow-devs",
    "github_project": "flyflow-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "flyflowclient"
}
        
Elapsed time: 0.29598s