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:
DBclass for LevelDB database operationsWriteBatchclass for batch operationsPrefixedDBclass 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eca888abcc88d0883d911e10fbe5b1b026686fe13a20068aa32165aff61fa18
|
|
| MD5 |
0943476545c39d524af235fd58d4c23f
|
|
| BLAKE2b-256 |
8e817ea2d623e2fc721ecc57e236a9a65f93e553c4fa6ff2b286af1c572459b2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
664b2dc70de147fd0b3b52de40d526fc46600760304e0fe503be063da1d1ced7
|
|
| MD5 |
77bd719ac91070ee36703e35f1db7b87
|
|
| BLAKE2b-256 |
e73a0d9671965fef1e3b54500887a49a1d68905754c00aaae694bb299d370c27
|