zvukogram


Namezvukogram JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/nikitalm8/zvukogram
SummaryAsynchronous ZvukoGram API wrapper
upload_time2023-04-03 17:07:56
maintainer
docs_urlNone
authorNikita Minaev
requires_python
license
keywords python zvukogram payments async asyncio aiohttp pydantic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<div align="left">
    <h1>ZvukoGram API <img src="https://zvukogram.com/design/img/dispic/zvuklogo.png" width=30 height=30></h1>
    <p align="left" >
        <a href="https://pypi.org/project/zvukogram/">
            <img src="https://img.shields.io/pypi/v/zvukogram?style=flat-square" alt="PyPI">
        </a>
        <a href="https://pypi.org/project/zvukogram/">
            <img src="https://img.shields.io/pypi/dm/zvukogram?style=flat-square" alt="PyPI">
        </a>
    </p>
</div>

A simple, yet powerful library for [ZvukoGram API](https://zvukogram.com/node/api/)


## Usage

With ``ZvukoGram API`` you can fully access the ZvukoGram API.

## Documentation

Official docs can be found on the [API's webpage](https://zvukogram.com/node/api/)

## Installation

```bash
pip install zvukogram
```

## Requirements

 - ``Python 3.7+``
 - ``aiohttp``
 - ``pydantic``

## Features

 - ``Asynchronous``
 - ``Exception handling``
 - ``Pydantic return model``
 - ``LightWeight``

## Basic example

```python
import asyncio

from zvukogram import ZvukoGram, ZvukoGramError


api = ZvukoGram('token', 'email') 


async def main():

    try:

        voices = await api.get_voices()
        print(voices['Русский'].pop().voice)

    except ZvukoGramError as exc:

        print(exc)

    generation = await api.tts(
        voice='Бот Максим',
        text='Привет!',
    )

    print(generation.file)
    audio = await generation.download()


    generation = await api.tts_long(
        voice='Бот Максим',
        text='Более длинный текст!',
    )
    while not generation.file:

        await asyncio.sleep(1)
        generation = await api.check_progress(generation.id)

    print(generation.file)

asyncio.run(main())
```

Developed by Nikita Minaev (c) 2023

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nikitalm8/zvukogram",
    "name": "zvukogram",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,zvukogram,payments,async,asyncio,aiohttp,pydantic",
    "author": "Nikita Minaev",
    "author_email": "<nikita@minaev.su>",
    "download_url": "https://files.pythonhosted.org/packages/14/d5/b59b3173c8e1f8a17db2eab236a6918a0b194149c83428c1fb4260c9eca2/zvukogram-1.0.1.tar.gz",
    "platform": null,
    "description": "\n<div align=\"left\">\n    <h1>ZvukoGram API <img src=\"https://zvukogram.com/design/img/dispic/zvuklogo.png\" width=30 height=30></h1>\n    <p align=\"left\" >\n        <a href=\"https://pypi.org/project/zvukogram/\">\n            <img src=\"https://img.shields.io/pypi/v/zvukogram?style=flat-square\" alt=\"PyPI\">\n        </a>\n        <a href=\"https://pypi.org/project/zvukogram/\">\n            <img src=\"https://img.shields.io/pypi/dm/zvukogram?style=flat-square\" alt=\"PyPI\">\n        </a>\n    </p>\n</div>\n\nA simple, yet powerful library for [ZvukoGram API](https://zvukogram.com/node/api/)\n\n\n## Usage\n\nWith ``ZvukoGram API`` you can fully access the ZvukoGram API.\n\n## Documentation\n\nOfficial docs can be found on the [API's webpage](https://zvukogram.com/node/api/)\n\n## Installation\n\n```bash\npip install zvukogram\n```\n\n## Requirements\n\n - ``Python 3.7+``\n - ``aiohttp``\n - ``pydantic``\n\n## Features\n\n - ``Asynchronous``\n - ``Exception handling``\n - ``Pydantic return model``\n - ``LightWeight``\n\n## Basic example\n\n```python\nimport asyncio\n\nfrom zvukogram import ZvukoGram, ZvukoGramError\n\n\napi = ZvukoGram('token', 'email') \n\n\nasync def main():\n\n    try:\n\n        voices = await api.get_voices()\n        print(voices['\u0420\u0443\u0441\u0441\u043a\u0438\u0439'].pop().voice)\n\n    except ZvukoGramError as exc:\n\n        print(exc)\n\n    generation = await api.tts(\n        voice='\u0411\u043e\u0442 \u041c\u0430\u043a\u0441\u0438\u043c',\n        text='\u041f\u0440\u0438\u0432\u0435\u0442!',\n    )\n\n    print(generation.file)\n    audio = await generation.download()\n\n\n    generation = await api.tts_long(\n        voice='\u0411\u043e\u0442 \u041c\u0430\u043a\u0441\u0438\u043c',\n        text='\u0411\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442!',\n    )\n    while not generation.file:\n\n        await asyncio.sleep(1)\n        generation = await api.check_progress(generation.id)\n\n    print(generation.file)\n\nasyncio.run(main())\n```\n\nDeveloped by Nikita Minaev (c) 2023\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Asynchronous ZvukoGram API wrapper",
    "version": "1.0.1",
    "split_keywords": [
        "python",
        "zvukogram",
        "payments",
        "async",
        "asyncio",
        "aiohttp",
        "pydantic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20ef1f0248821b6c14bdf25cdcfcc8f9e1dda8f378cdf37350f2005b0300b2a3",
                "md5": "2c6968f1ea817d342fba4140b43fce07",
                "sha256": "27fd9c6fad83e5a76ed5189803fae651a6670b6d29188714f940cc0a5856261e"
            },
            "downloads": -1,
            "filename": "zvukogram-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2c6968f1ea817d342fba4140b43fce07",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5848,
            "upload_time": "2023-04-03T17:07:55",
            "upload_time_iso_8601": "2023-04-03T17:07:55.305894Z",
            "url": "https://files.pythonhosted.org/packages/20/ef/1f0248821b6c14bdf25cdcfcc8f9e1dda8f378cdf37350f2005b0300b2a3/zvukogram-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14d5b59b3173c8e1f8a17db2eab236a6918a0b194149c83428c1fb4260c9eca2",
                "md5": "fd5c0c54d26373ac0ee0de1d804b041d",
                "sha256": "da8923cba32734a0c5b9d3b5e24e4b8a539c801c1a21a66157281c1caa126434"
            },
            "downloads": -1,
            "filename": "zvukogram-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fd5c0c54d26373ac0ee0de1d804b041d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5126,
            "upload_time": "2023-04-03T17:07:56",
            "upload_time_iso_8601": "2023-04-03T17:07:56.914788Z",
            "url": "https://files.pythonhosted.org/packages/14/d5/b59b3173c8e1f8a17db2eab236a6918a0b194149c83428c1fb4260c9eca2/zvukogram-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-03 17:07:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "nikitalm8",
    "github_project": "zvukogram",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "zvukogram"
}
        
Elapsed time: 0.50506s