A UniqueQueue class - a FIFO queue, but which ignores attempts to re-add duplicate items, even after they're popped.
Project description
UniqueQueue
A Python UniqueQueue class - a FIFO queue, but which ignores attempts to re-add duplicate items, even after they're popped.
Example
When doing activities like web scraping, you must keep a queue of pending pages to visit/scrape, based on links found on already-scraped pages. You must also avoid re-visiting already-visited pages, or risk duplicates in the output dataset.
from unique_queue import UniqueQueue
uq = UniqueQueue()
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 unique_queue-0.1.tar.gz.
File metadata
- Download URL: unique_queue-0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6494b6ecaf683706b87b189eb46acf4583d2952c5447d09a2c419e4621833af
|
|
| MD5 |
19434c40f285eb0f6a4d13c37504daea
|
|
| BLAKE2b-256 |
ed6dcf80e716e2099c9121d5eb0920217611d3f523802ea73d127b7be97d533d
|
File details
Details for the file unique_queue-0.1-py3-none-any.whl.
File metadata
- Download URL: unique_queue-0.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
084e7c97858fc0e8b56e9a5e315b5a619c940048276d3baf63bb7718f8d5fe42
|
|
| MD5 |
662434760a35cfe5d602ca9b78779dfe
|
|
| BLAKE2b-256 |
3a2fa199af35f3affeaa2709f3eca0d51a47fe7c4934a77355a2cde8b6511601
|