
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Single-ended fast queues built in C tuned for Python.
python 3.7+
To install fastqueue, using pip:
pip install fastqueue-lib
For general use cases fastqueue.Queue()
objects are tuned to perform well.
The enqueue and dequeue methods perform well over a large sequence of arbitrary operations.
fastqueue.Queue()
supports many standard sequence methods similar to lists.
fastqueue.Queue()
minimizes memory usage but maintains the fast queue speeds.
>>> from fastqueue import Queue
>>> queue = Queue()
>>> queue.extend(['🚒', '🛴'])
>>> queue[0]
'🚒'
>>> '🛴' in queue
True
>>> queue.enqueue('🚅')
>>> queue.enqueue('🚗')
>>> queue[-1]
'🚗'
>>> [queue.dequeue() for _ in range(len(queue)) ]
['🚒', '🛴', '🚅', '🚗']
For more specialized cases fastqueue.QueueC()
objects are tuned to perform well.
The interface for fastqueue.QueueC()
is identical to fastqueue.Queue()
.
The enqueue and dequeue methods perform similarly well over a large sequence of arbitrary operations.
fastqueue.QueueC()
handles memory differently by doubling the capacity when full.
This increases the complexity but maintains fast amortized cost.
The benefit of this approach is even faster __getitem__
and __setitem__
speeds
>>> from fastqueue import QueueC
>>> queue_c = QueueC()
>>> queue_c.extend(['🚒', '🛴'])
>>> queue_c[0]
'🚒'
>>> '🛴' in queue_c
True
>>> queue_c.enqueue('🚅')
>>> queue_c.enqueue('🚗')
>>> queue_c[-1]
'🚗'
>>> [queue_c.dequeue() for _ in range(len(queue_c)) ]
['🚒', '🛴', '🚅', '🚗']
Another alternative is fastqueue.LockQueue()
which supports all queue operations.
fastqueue.LockQueue()
is built as a thread-safe alternative to the other queue types.
Ubuntu
Windows
Ubuntu
Windows
FAQs
Fast single ended queue library for python
We found that fastqueue-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.