skillfed

atomos

Atomic primitives for Python.

atomos v0.3.1 118.7K downloads/30d#12,107 on PyPI123
Permissive license BSD Abandoned released

What it is and what it does

Atomos is a library of atomic primitives inspired by Java's concurrent.atomic package and Clojure's atoms. It wraps primitive types (int, float, bool) and arbitrary objects in thread-safe containers that handle locking semantics internally, allowing developers to safely share mutable state across threads without manually orchestrating locks.

The library's core concept is the Atom, which uses compare-and-set semantics to ensure that updates to shared state are atomic and consistent. Instead of calling swap() with a function that receives the current state and returns an updated one, developers can write cleaner concurrent code. Atomos also provides lower-level atomic primitives like AtomicInteger and AtomicReference for simpler use cases, and supports multiprocessing via a separate import path.

Use it for:

  • Building thread-safe counters or accumulators in multi-threaded applications without explicit lock calls
  • Managing shared application state (e.g., connected clients, session counts) in concurrent servers
  • Protecting updates to complex objects in multi-threaded contexts using AtomicReference wrappers
  • Porting concurrent patterns from Java or Clojure that rely on atomic types to Python

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Atomos provides thread-safe atomic primitives (integers, floats, bools, objects) and atoms for managing shared mutable state in multi-threaded Python applications without explicit lock management.

No. The package is abandoned (no releases or commits since 2015) and targets Python 2.7 and 3.3–3.4. While it has no known vulnerabilities and a permissive license, its compatibility with modern Python versions is unverified and unmaintained. For new projects requiring thread-safe primitives, consider actively maintained alternatives or Python's built-in threading and queue modules.

Install

atomos on PyPI

pip

pip install atomos

uv

uv add atomos

poetry

poetry add atomos

Installing atomos

Before you install

High install friction: the package is abandoned (last commit 2021-04-29, no releases since 2015-07-05) and has not been updated in many years. While it carries no known vulnerabilities and has no runtime dependencies, the stalled maintenance status means bug fixes and compatibility updates are unlikely.

License in practice

BSD license (permissive) places no restrictions on use, modification, or distribution in your own projects.

Quickstart

pip install atomos

import atomos.atom as atom
state = atom.Atom({'count': 0})
state.swap(lambda s: {**s, 'count': s['count'] + 1})

Package targets Python 2.7, 3.3, and 3.4; compatibility with later Python versions is unverified.

Verify before relying

  • Whether atomos works correctly with Python versions released after 2015
  • Whether the compare-and-set implementation remains performant or correct on modern CPython
  • Whether multiprocessing support (mentioned in docs) is fully functional and tested

Package facts

License BSD (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 4,058 days since the last release
Last repo commit
First released
Downloads 118,687/month — #12,107 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: atomos-0.3.1.tar.gz

Keywords: atom, atomic, concurrency, lock

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Utilities

Tags

atomic primitives pythonthread-safe shared statecompare-and-set semanticsconcurrent data structuresmultithread safe countersatom data type pythonlock-free synchronization
concurrencyabandonedlegacy

More Utilities packages