Skip to main content

Revoize Python SDK

Project description

Revoize SDK

CI

This package allows you to interact with Revoize through Python.

Installation

To install:

pip install revoize

Basic usage

To use this package you will need to have created an account with Revoize and use your account credentials as username and password in the commands below.

To enhance your file (my-file.wav) with Revoize you can either use the CLI:

revoize-enhance \
    --username **** \
    --password **** \
    --input-file-path my-file.wav \
    --output-file-path my-file-enhanced.wav

or through the Python API:

from revoize import RevoizeClient

client = RevoizeClient(username="****", password="****")
client.enhance_file("my-file.wav", "my-file-enhanced.wav")

Advanced usage

Additional parameters

You can also specify some processing parameters:

  • output loudness - in LUFS, between -32 and -8

Using the CLI you can specify this through the --output-loudness parameter.

Using the Python API:

from revoize.api import RevoizeClient
from revoize.schema import EnhancementParameters

client = RevoizeClient(username="****", password="****")
params = EnhancementParameters(loudness=-20)
client.enhance_file("my-file.wav", "my-file-enhanced.wav", params)

Using with a different Revoize tenant

You may need to use this SDK against a different Revoize environment than our production. In that case, you should be provided 3 configuration parameters:

  • cognito_client_id
  • cognito_region
  • revoize_url

All of those should be passed to the RevoizeClient constructor like:

from revoize.api import RevoizeClient
client = RevoizeClient(
    username="****",
    password="****",
    revoize_url=revoize_url,
    cognito_client_id=cognito_client_id,
    cognito_region=cognito_region
)

After this setup, you can use the client object as usual.

Publishing to PyPI

This section contains a guide for maintainers about publishing to PyPI.

Before you can publish updates to this package you need to go through a few steps of configuration:

  1. Globally install poetry (https://python-poetry.org/) and poethepoet (https://poethepoet.natn.io/)
  2. Create a PyPI account.
  3. Contact Revoize admins to add you to package maintainers.
  4. Create a PyPI API token.
  5. Configure Poetry to use the API token with poetry config pypi-token.pypi <token>

You can then issue updates with:

  1. poe bump-version (major|minor|patch)
  2. Commit the change, have it reviewed and merged
  3. poe publish

Testing

To test the SDK against production environment, all you need to do is run:

TEST_USERNAME="<your Revoize username>" TEST_PASSWORD="<your Revoize password>" poe test

If you would like to test the SDK against a different environment, you need to supply additional env variables:

TEST_USERNAME="***" \
    TEST_PASSWORD="***" \
    TEST_REVOIZE_URL="***" \
    COGNITO_CLIENT_ID="***" \
    COGNITO_REGION="***"
    poe test

Feel free to contact Revoize Support to find out what values you should use here.

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

revoize-0.1.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revoize-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file revoize-0.1.1.tar.gz.

File metadata

  • Download URL: revoize-0.1.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/23.4.0

File hashes

Hashes for revoize-0.1.1.tar.gz
Algorithm Hash digest
SHA256 096832d0c80e815db5fe8ac77e34eaef35b043e2dd16c480385254bbc21d818c
MD5 ef5e1b09f57af61a0282d6efc351d137
BLAKE2b-256 481188d0b3804cdfb00cafe228e3afdac933377a3015c36cb8aef87dfd461eca

See more details on using hashes here.

File details

Details for the file revoize-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: revoize-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/23.4.0

File hashes

Hashes for revoize-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 199b2cff6c452cad4bc5c544fd193dc99ccbfaf05f4cab55fbeb4fe7295071bb
MD5 8ac4cb3fb60e9f9a9f1e6fb96103e77a
BLAKE2b-256 9dc636f3c43037ea7a00d5d81526b9d3fcf49b72cbbd3578f2d823186a1aaccd

See more details on using hashes here.

Supported by

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