Skip to main content

Type stubs for plyvel

Project description

plyvel-stubs

Type stubs for plyvel, a Python interface to LevelDB.

Installation

pip install plyvel-stubs

Usage

These stubs provide type information for the plyvel package. Once installed, your type checker (like mypy, pyright, or Pylance) will automatically use these stubs when checking code that uses plyvel.

Supported Types

The package provides type information for:

  • DB class for LevelDB database operations
  • WriteBatch class for batch operations
  • PrefixedDB class for prefix-based database operations

Example

from plyvel import DB

db = DB("/path/to/db", create_if_missing=True)
db.put(b"key", b"value")
value = db.get(b"key")  # Type: Optional[bytes]

# Using with context manager
with db.write_batch() as batch:
    batch.put(b"key1", b"value1")
    batch.put(b"key2", b"value2")

# Using prefix database
prefixed_db = db.prefixed_db(b"prefix-")
prefixed_db.put(b"key", b"value")  # Will store as "prefix-key"

Development

This package contains only type stubs (.pyi files) for the plyvel package. It does not contain any runtime code.

License

MIT License - see LICENSE file for details.

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

plyvel_stubs-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

plyvel_stubs-0.0.1-py2.py3-none-any.whl (3.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file plyvel_stubs-0.0.1.tar.gz.

File metadata

  • Download URL: plyvel_stubs-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for plyvel_stubs-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6eca888abcc88d0883d911e10fbe5b1b026686fe13a20068aa32165aff61fa18
MD5 0943476545c39d524af235fd58d4c23f
BLAKE2b-256 8e817ea2d623e2fc721ecc57e236a9a65f93e553c4fa6ff2b286af1c572459b2

See more details on using hashes here.

File details

Details for the file plyvel_stubs-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: plyvel_stubs-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for plyvel_stubs-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 664b2dc70de147fd0b3b52de40d526fc46600760304e0fe503be063da1d1ced7
MD5 77bd719ac91070ee36703e35f1db7b87
BLAKE2b-256 e73a0d9671965fef1e3b54500887a49a1d68905754c00aaae694bb299d370c27

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