Atomion
Module servant à manipuler facilement :
- Quark
- Proton, Neutron, Electron
- Noyau
- Atome
- Ion (monoatomique/polyatomique)
- Molécule
- Equation chimique
- Réaction chimique
- Demi-équation
- Oxydo-réduction
- Électronégativité
- Molécule organique
- Reaction acido-basique
Prévues :
- Fusion nucléaire (Non-fini)
- Fission nucléaire
- Gluons
- Antimatière
- Maintien des liaisons
Vous trouverez un dossier exemples avec les diverses fonctionnalités.
Le module est compatible avec Micro Python 1.9.4, donc aussi pour les calculatrices !
Aperçu
from atomion import *
oxygene = Atome('O') # Avec symbole
hydrogene = Atome(1) # Avec nombre proton
chlorure = Ion('Cl')
# Ou
chlorure = IonMonoAtomique('Cl')
carbonate = Ion('CO3')
# Ou
carbonate = Ion('{CO3 2-}')
# Ou
carbonate = IonPolyAtomique('CO3')
eau = hydrogene * 2 + oxygene
# Ou
eau = Molecule('H2O')
from atomion.raccourcis import *
eau = H * 2 + O
# Ou
eau = H2O
# Quark
proton = QUp('R') + QDown('B') + QUp('V')
neutron = QUp('R') + QDown('B') + QDown('V')
# Fusion
noyauH = Noyau(Proton(1), Neutron(1))
noyauHe, *particules = noyauH << noyauH
atomeHe = noyauHe + Electron(2)
equation = Equation('H2 + O2 -> H2O')
equation.equilibrer()
equation == '2 H₂ + O₂ -> 2 H₂O'
equation = DemiEquation('Cl2', '{Cl -}')
equation.equilibrer()
equation == 'Cl₂ + 2 e⁻ -> 2 Cl⁻'
reaction = Reaction(
equation = equation,
quantites_reactifs = {H2: 1.6, O2: 1.3}
)
reaction.final() == {H2: 0, O2: 0.5, H2O: 1.6}
oxydoR = OxydoReduction(
Ion('{Cr2O7 2-}'),
Atome('Fe')
)
oxydoR.don == 'Fe -> Fe²⁺ + 2 e⁻'
oxydoR.gain == 'Cr₂O₇²⁻ + 14 H⁺ + 6 e⁻ -> 2 Cr³⁺ + 7 H₂O'
reaction = AcidoBasique('{C3H5O2 -}', '{H3O +}')
reaction.gain == 'C₃H₅O₂⁻ + H⁺ -> C₃H₆O₂'
reaction.don == 'H₃O⁺ -> H₂O + H⁺'
reaction.equation == 'H₃O⁺ + C₃H₅O₂⁻ -> H₂O + C₃H₆O₂'
Affichage
Le rendu des notations suit l'environnement : ¹²₆C, H₂O, Cl⁻ sur ordinateur,
C, H2O, {Cl 1-} sur calculatrice. Il peut être forcé à tout moment :
from atomion import *
from atomion.utile import params
params.config(affichage = 'ascii') # notation calculatrice
params.config(affichage = 'unicode') # notation scientifique
(params.config(calculatrice = True) équivaut à affichage = 'ascii' : c'est ce mode qui est actif dans le fichier unique destiné aux calculatrices.)
Pour voir le reste des fonctionnalités, regardez le dossier exemples.
Installer
Ordinateur
-
Ouvrez une invite de commande.
Comment faire ?
Sur Windows, appuyez sur la touche
Windows+ la toucheR, et écrivezcmddans la fenêtre qui s'est ouverte. -
Assurez-vous d'avoir
Python >=3.9d'installé.Comment savoir ?
Ecrivez
python --versiondans l'invite de commande. Si Python est installé cela affichera la version qui doit être supérieur à3.9. Si ce n'est pas le cas, installer Python dans une version égal ou supérieur à 3.9 pour éviter les soucis de compatibilité. -
Vérifiez que
pipest installé.Comment vérifier ?
Ecrivez
pip --versiondans l'invite de commande. Sipipest installé cela affichera la version qui doit être supérieur à20.0.0.
Si ce n'est pas le cas, écrivezpython -m pip install --upgrade pippour mettre à jour. -
Ecrivez la commande suivante :
pip install atomion
-
Lors de nouvelle mise à jour il suffira de rajouter
--upgradepour mettre le module à jour :pip install atomion --upgrade
-
Ensuite créez un nouveau fichier, importez le module, et amusez vous !
from atomion import * print(Atome('C') + Molecule('O2'))
Calculatrice
-
Ouvrez le
.zipet glissez le dossier qui se trouve à l'intérieur autre part (dans un endroit accessible). -
Installez
python_minifier, requis pour produire le fichier à sa taille minimale :pip install "atomion[calc]"
-
Ouvrez le dossier que vous avez déplacé et executer le fichier
mk_file_calculatrice.py. -
Un fichier
atomion.py(~63 ko) va se créer, mettez le dans votre calculatrice (que vous aurez branchée à votre ordi). -
Si vous n'avez plus rien d'autre à faire, débranchez votre calculatrice et amusez-vous !
Si vous avez un problème, n'hésitez pas à regarder les issues déjà exitantes ou à en ouvrir une.
Licence
Ce projet est distribué sous GNU Affero General Public License v3.0 ou ultérieure (AGPL-3.0-or-later).
- Texte complet :
LICENSE- gnu.org - Vous pouvez utiliser, étudier, modifier et redistribuer atomion, y compris à des fins commerciales.
- En contrepartie : tout dérivé distribué ou exposé via un réseau (site web, API, SaaS) doit rester sous AGPL et fournir son code source à ses utilisateurs.
- La mention de copyright et la licence doivent être conservées (pas de réappropriation).
Copyright (C) 2026 Asurix.
Metadata
Release files for atomion 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atomion-1.7.0.tar.gz | 67.8 kB | With provenance | Details for atomion-1.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atomion-1.7.0-py3-none-any.whl | Python 3 | none | any | Details for atomion-1.7.0-py3-none-any.whl |
Total release size: 120.0 kB
Release files / atomion-1.7.0.tar.gz
| Download URL | atomion-1.7.0.tar.gz |
|---|---|
| Size | 67.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb49ad55b25a725156868a38d78e34a1fb721814c6fbfbc415745bc633cf4d4d
|
|
BLAKE2b-256 checksum How to use checksums |
019c9bf403f24dce6751af21f4903fd6178d2477c399e7e4584d1f63f3faca94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / atomion-1.7.0-py3-none-any.whl
| Download URL | atomion-1.7.0-py3-none-any.whl |
|---|---|
| Size | 52.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48885747d7a9b3dbf598431d848cecd763f72effba926eef299af4921d5e0f2d
|
|
BLAKE2b-256 checksum How to use checksums |
eb35e11b6dcf562d18f23dcdabb8b9b114e225896a0de05e7246724cafd713fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for atomion 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for atomion-1.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.