Skip to main content

Python SDK for the Beatlyze audio analysis API.

Project description

beatlyze

Python SDK for the Beatlyze audio analysis API.

Install

pip install beatlyze

Quick start

from beatlyze import Beatlyze

bz = Beatlyze("bz_your_api_key")

# Analyze from URL (blocks until complete)
result = bz.analyze_url("https://example.com/track.mp3")
print(result["bpm"])        # 128.4
print(result["key"])        # "A"
print(result["energy"])     # 0.78

# Analyze a local file
result = bz.analyze_file("./my-track.wav")

# Async: submit without waiting
job = bz.analyze_url("https://example.com/track.mp3", wait=False)
print(job["job_id"])  # check later with bz.get_analysis(job["job_id"])

# Batch (up to 10 URLs)
jobs = bz.analyze_batch([
    "https://example.com/a.mp3",
    "https://example.com/b.mp3",
])

# Check usage
usage = bz.get_usage()
print(f"{usage['count']}/{usage['limit']} analyses used this month")

Result fields

Field Type Description
bpm float Tempo in beats per minute
key str Musical key (e.g. "A")
scale str "major" or "minor"
key_notation str Combined (e.g. "Am")
energy float 0.0 - 1.0
danceability float 0.0 - 1.0
valence float 0.0 - 1.0 (mood)
loudness_lufs float Integrated loudness
duration_seconds float Track duration
mood_tags list[str] e.g. ["energetic", "dark"]
genre_suggestions list[str] e.g. ["techno", "house"]

License

MIT

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

beatlyze-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

beatlyze-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file beatlyze-0.1.0.tar.gz.

File metadata

  • Download URL: beatlyze-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for beatlyze-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bacf8017e77655882ca4b3b1482c0373579ee450020ef7f80136aa54e456fea4
MD5 b7073d007d07083d2e67b483214ec3e3
BLAKE2b-256 66622ef8031b7e9590832e133c64de4ac113d3b432c960092ae80c293a320f96

See more details on using hashes here.

File details

Details for the file beatlyze-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: beatlyze-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for beatlyze-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12c5d5e54aeacae6262ea6cd45b0e1ef9a883c3be520b5b731651dfd79f08014
MD5 018fcef9247e40c7562aa7ee376c97c5
BLAKE2b-256 9fc72ad58660815ec2fddb0452693fead6da939f890bac89685a61776f09268e

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