Allociné
Description
Avec cet outil, vous récupérez les horaires des séances ciné directement dans le terminal.
Prérequis
- Python 3.11 ou une version ultérieure
- uv
Installation
uv tool install --upgrade allocine
Utilisation en ligne de commande
Commencez par rechercher l’identifiant de votre cinéma sur allocine.fr.
Recherchez votre cinéma et relevez son identifiant dans l’URL. Dans cet exemple, il s’agit de P0645.
Aide
seances --help
Usage: seances [OPTIONS] ID_CINEMA
Les séances de votre cinéma dans le terminal, avec ID_CINEMA : identifiant
du cinéma sur Allociné, ex: C0159 pour l’UGC Ciné Cité Les Halles. Se
trouve dans l’url :
http://allocine.fr/seance/salle_gen_csalle=<ID_CINEMA>.html
Options:
-j, --jour TEXT jour des séances souhaitées (au format DD/MM/YYYY ou +1
pour demain), par défaut : aujourd’hui
-s, --semaine affiche les séance pour les 7 prochains jours
-e, --entrelignes ajoute une ligne entre chaque film pour améliorer la
lisibilité
--help Show this message and exit.
Utilisation simple
seances P2235
27/12/2018
┌──────────────────────────────────────────────────────────┬──────┬───────┬───────┬───────┬───────┐
│ Astérix - Le Secret de la Potion Magique... (VF) - 01h25 │ 4.1* │ 10:15 │ │ │ │
│ L’Empereur de Paris (VF) - 01h50 │ 3.4* │ │ │ 17:15 │ │
│ Ma mère est folle (VF) - 01h35 │ 3.0* │ │ 14:15 │ │ │
│ Marche ou crève (VF) - 01h25 │ 3.6* │ │ │ │ 20:15 │
└──────────────────────────────────────────────────────────┴──────┴───────┴───────┴───────┴───────┘
Pour demain, avec des interlignes
seances P2235 -j+1 --entrelignes
28/12/2018
┌────────────────────────────────────────────────────┬──────┬───────┬───────┬───────┐
│ Casse-noisette et les quatre royaumes (VF) - 01h39 │ 3.1* │ │ │ 20:15 │
├────────────────────────────────────────────────────┼──────┼───────┼───────┼───────┤
│ Ma mère est folle (VF) - 01h35 │ 3.0* │ │ 17:15 │ │
├────────────────────────────────────────────────────┼──────┼───────┼───────┼───────┤
│ Marche ou crève (VF) - 01h25 │ 3.6* │ 14:15 │ │ │
└────────────────────────────────────────────────────┴──────┴───────┴───────┴───────┘
Pour une date précise
seances P2235 --jour 29/12/2018
Pour toute la semaine
seances P2235 --semaine
Utilisation de la bibliothèque
from allocine import Allocine
with Allocine() as allocine:
showtimes = allocine.get_showtimes("P2235")
for showtime in showtimes:
print(showtime)
Exemple de sortie :
27/12/2018 10:15 : Astérix - Le Secret de la Potion Magique [244560] (VF) (01h25)
27/12/2018 14:15 : Ma mère est folle [260370] (VF) (01h35)
27/12/2018 17:15 : L’Empereur de Paris [258914] (VF) (01h50)
27/12/2018 20:15 : Marche ou crève [258052] (VF) (01h25)
28/12/2018 14:15 : Marche ou crève [258052] (VF) (01h25)
28/12/2018 17:15 : Ma mère est folle [260370] (VF) (01h35)
28/12/2018 20:15 : Casse-noisette et les quatre royaumes [245656] (VF) (01h39)
29/12/2018 14:15 : Astérix - Le Secret de la Potion Magique [244560] (VF) (01h25)
[...]
Chaque film expose également showtime.movie.release_date (datetime.date | None) : la plus ancienne sortie
cinéma initiale référencée par Allociné (Released, type THEATER), uniquement si sa date est précise au jour.
Les ressorties, la VOD et les supports physiques sont exclus. Si aucune sortie initiale avec une date complète
n’est disponible, la valeur est None. Cette information provient des réponses des séances, sans requête supplémentaire,
et est conservée par showtime.movie.get_movie(). L’attribut year reste l’année de production.
Le cache est activé par défaut. Les réponses sont enregistrées dans le répertoire de cache utilisateur du système :
- macOS:
~/Library/Caches/allocine - Linux:
${XDG_CACHE_HOME:-~/.cache}/allocine - Windows:
%LOCALAPPDATA%\\allocine\\Cache
Videz le cache en ligne de commande (aucun identifiant de cinéma n’est nécessaire) :
seances --clear-cache
Développement
Créez l’environnement virtuel et installez le paquet avec ses dépendances de développement :
uv sync --extra dev
Installez les hooks pre-commit une première fois, puis utilisez make check pour analyser, formater et vérifier les types
de l’ensemble du code :
uv run pre-commit install
make check
Exécutez chaque vérification sans modifier les fichiers :
uv run ruff check .
uv run ruff format --check .
uv run ty check
Exécutez manuellement tous les hooks pre-commit avec :
uv run pre-commit run --all-files
Les utilisateurs de VS Code doivent accepter les recommandations d’extensions de l’espace de travail afin d’activer les diagnostics Ruff et ty en temps réel, ainsi que le formatage Ruff à l’enregistrement.
Publication
Le workflow de publication publie sur PyPI les tags de version tels que 0.0.13 grâce à Trusted Publishing, sans
stocker de jeton d’API. Avant la première publication :
- Créez un environnement GitHub nommé
pypi. Il est recommandé d’exiger une approbation avant tout déploiement. - Dans les paramètres de publication PyPI du projet
allocine, ajoutez un Trusted Publisher GitHub avec le propriétairetducret, le dépôtallocine-python, le workflowrelease.ymlet l’environnementpypi.
Le tag Git définit la version du paquet ; aucun fichier de version ne doit être mis à jour. Ajoutez le tag au commit à publier. Le workflow rejette les distributions dont la version ne correspond pas au tag et effectue un test rapide du wheel et de la distribution source avant leur publication :
VERSION=0.0.13
git tag -a ${VERSION} -m ${VERSION}
git push origin ${VERSION}
Metadata
Release files for allocine 0.1.8
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 |
|---|---|---|---|---|
| allocine-0.1.8.tar.gz | 1.6 MB | With provenance | Details for allocine-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| allocine-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for allocine-0.1.8-py3-none-any.whl |
Total release size: 1.7 MB
Release files / allocine-0.1.8.tar.gz
| Download URL | allocine-0.1.8.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e104f8aab98c4026016f1c1fa899fe62d0eb84288dfbd17ff77a00429c08865
|
|
BLAKE2b-256 checksum How to use checksums |
19969ade92671e96c860f0135aee9f9bf0c818f576efbb6a2456df5962e2e62f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
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 3, 2026.
Transparency logRelease files / allocine-0.1.8-py3-none-any.whl
| Download URL | allocine-0.1.8-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
773b5a9bd0c3b804c405eee15deb81bad8fb3d3da21c07cdd7bac2153b7a0d68
|
|
BLAKE2b-256 checksum How to use checksums |
c96042fc7b37af26e614f0f15c4043d3e27894c70a10f166a62c013a2c2e4f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
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 3, 2026.
Transparency logSecurity for allocine 0.1.8
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 allocine-0.1.8.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 3, 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.