Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.252s · 18.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.226s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Queue
✓ from persistqueue import Queue
✗ from persistqueue.file import Queue
Queue is now at top-level since v1.0.0
SQLiteQueue
✓ from persistqueue.sqlite import SQLiteQueue
MySQLQueue
✓ from persistqueue.mysql import MySQLQueue
Basic usage of file and SQLite persistent queues.
import os
from persistqueue import Queue
# File-based queue
q = Queue('myqueue')
q.put('foo')
q.put('bar')
print(q.get()) # foo
print(q.get()) # bar
# SQLite-based queue
from persistqueue.sqlite import SQLiteQueue
sqlq = SQLiteQueue('myqueue.db', auto_commit=True)
sqlq.put({'task': 'example'})
print(sqlq.get()) # {'task': 'example'}
# To ensure auth check (not needed for persist-queue):
db_path = os.environ.get('PERSIST_QUEUE_PATH', 'default.db')
print('Queue path:', db_path)
Errors
Common errors & fixes
ImportError: cannot import name 'Queue' from 'persistqueue'
Old import path `from persistqueue import Queue` not available in versions before 1.0.0; or using wrong package name.
fixUpgrade to persist-queue >=1.0.0: `pip install -U persist-queue`.
AttributeError: 'Queue' object has no attribute 'full'
Method `full()` was added in v0.8.1. Older versions do not have it.
fixUpgrade to v0.8.1 or later: `pip install -U persist-queue`.
TypeError: put() got an unexpected keyword argument 'raw'
The `raw` argument is only supported for SQLite-based queues, not file-based Queue.
fixUse `q.put(item, raw=True)` only with SQLiteQueue or MySQLQueue.
Upgrade
Version history
1.1.0latest on PyPI · released Oct 25, 2025
Audit
Dependencies
No dependency data recorded yet.