Skip to main content

Stub-only package containing type information for pydub

Project description

pydub-stubs

Pydub version: 0.25.1

pydub-stubs provides type information for Pydub.
Only the public interface is guaranteed to be typed, however there are type definitions for some private and undocumented functions.

pip install pydub-stubs

Anticipated Questions

Q: What is _Metadata and _PartialMetadata?

These are legacy types that have been replaced by the channels, frame_rate, and sample_rate keyword arguments.


Changelog

Version 0.25.1.5

  • Fixed incorrect WhiteNoise generator name
    Previously, the generator was incorrectly named Whitenoise. (#7 - thanks, @Kakadus!)

Version 0.25.1.4

  • Added "effect" functions as methods on AudioSegment
    The methods have always been accessible on AudioSegment, but since they are not defined on the class, they were not previously defined in the type stubs. Note that if pydub.scipy_effects is imported, the effect methods may have slightly different definitions.

Version 0.25.1.3

  • Added typing.BinaryIO to _PathLike
    Pydub supports using an IO object in place of a file for both creating and exporting AudioSegments. (Fixes #5)

Version 0.25.1.2

  • Added pathlib.Path to _PathLike
    Allows you to use Path objects in place of strings. (thanks, @qthequartermasterman!)

Version 0.25.1.1

  • Removed literal type fallback overloads
    The fallbacks removed all the advantages of using literals at all.

  • Modernized the type stubs
    Uses new union syntax, and more. (#2 and #3 - thanks, @Viicos!)

  • Add WavSubChunk, WavData, and undocumented functions
    These previously existed and were available but were untyped. (thanks again, @Viicos!)

Previous versions

Version 0.25.1.0

  • Added v0.25.0 features
    This includes pydub.scipy_effects.eq and new classmethod parameters.

  • Signatures now use literals where possible
    Overloaded implementations exist as a fallback.

  • Added missing modules
    pydub.silence and pydub.utils

Version 0.24.1.9

  • Add undocumented parameter of AudioSegment.from_file
    read_ahead_limit is absent from the documentation but is a supported keyword argument.

Version 0.24.1.8

  • Export other modules
    Adds exports for effects, exceptions, generators, playback, and scipy_effects

Version 0.24.1.7

  • Added AudioSegment._spawn (again)
    This was accidentally removed in an earlier version.

  • Improved pydub.effects.invert_phase
    This is technically less accurate as (0, 0) is equivalent to (0, 1).

Version 0.24.1.6

  • Removed testing symbols from pydub.audio_segment

Version 0.24.1.5

  • Fixed AudioSegment.export
    First param is named out_f and isn't required.

Version 0.24.1.4

  • Improved signature of AudioSegment.from_file
    The keyword arguments for raw/PCM audio don't require format to be set to either raw or pcm.

  • Fixed package exports
    Exports AudioSegment from __init__.py.

Version 0.24.1.3

  • Fixed overloads of AudioSegment.fade
    Exactly two of start, end, and duration must be given.

Version 0.24.1.2

  • Improved AudioSegment.fade
    Changed to use overloads to prevent invalid method calls.

  • Improved AudioSegment.from_mono_audiosegments
    Use a positional-only parameter to ensure there's at least 1 argument.

Version 0.24.1.1

  • Fixed AudioSegment.__init__
    Use overloads to model correct parameters.

  • Fixed AudioSegment._spawn
    Parameter overrides accepts a partial dictionary.

  • Fixed pydub.scipy_effects.high_pass_filter
    Parameter order should be int, not float.

Version 0.24.1.0

Released

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

pydub_stubs-0.25.1.5.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

pydub_stubs-0.25.1.5-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file pydub_stubs-0.25.1.5.tar.gz.

File metadata

  • Download URL: pydub_stubs-0.25.1.5.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.6 Darwin/24.1.0

File hashes

Hashes for pydub_stubs-0.25.1.5.tar.gz
Algorithm Hash digest
SHA256 fa5e98441e7de3be3b8329c02c8a34c7900a2712d49cf52e47cd58c722c779e6
MD5 9afd70c4ac10a9abbfc084cbdc93f17f
BLAKE2b-256 c1f50482df00f87e95295888007c4dc94bf33bed74daf910f0587bcb9a2b6cf5

See more details on using hashes here.

File details

Details for the file pydub_stubs-0.25.1.5-py3-none-any.whl.

File metadata

  • Download URL: pydub_stubs-0.25.1.5-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.6 Darwin/24.1.0

File hashes

Hashes for pydub_stubs-0.25.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a463a81c832e4b720478c5e2e8f6c76000765c821797457b253aa695a352c414
MD5 4e5d0f5292bb6110f74553b48457b621
BLAKE2b-256 849c7c6fffba2b87dfda8248701d4fc28bc662562d5687123084fe63aa330b1c

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