🐓 Python en français, sacré bleu !
Project description
______ _ _
| ____| | | | |
| |__ _ __ _ _| |_| |__ ___ _ __
| __| '__| | | | __| '_ \ / _ \| '_ \
| | | | | |_| | |_| | | | (_) | | | |
|_| |_| \__, |\__|_| |_|\___/|_| |_|
__/ |
|___/
🐓 Frython
Python en français, sacré bleu !
🌍 Languages / Langues
🇫🇷 Français • 🇪🇸 Español • 🇨🇳 中文 • 🇮🇳 हिन्दी • 🇸🇦 العربية • 🇧🇷 Português • 🇷🇺 Русский • 🇯🇵 日本語 • 🇩🇪 Deutsch • 🇰🇷 한국어
🥐 What is it?
Frython is a programming language that transpiles Python code written entirely in French into standard Python. It's a humorous project, but fully functional — you can really program in French!
Frython translates Python keywords (if, while, for, print, etc.) into their French equivalents (si, tantque, pour, afficher, etc.).
"Why program in English when you can do it in French with 3 times more words?" — Victor Hugo, probably
⚡ Installation
pip install frython
From source
git clone https://github.com/Artleboss2/frython.git
cd frython
pip install .
Verify installation
python -m frython --version
# Frython 1.0.2 — Python en français 🐓
Windows (multiple Python versions)
C:\Python314\python.exe -m frython mon_fichier.fy
Or create a permanent PowerShell alias:
function frython { C:\Python314\python.exe -m frython $args }
🚀 Quick Start
Create a file bonjour.fy:
afficher("Bonjour le monde! 🐓")
prenom = "Marie"
age = 25
si age >= 18:
afficher(f"Bienvenue, {prenom}! Vous êtes majeur(e).")
sinon:
afficher(f"Bonjour, {prenom}! Vous êtes mineur(e).")
Run it:
python -m frython bonjour.fy
Bonjour le monde! 🐓
Bienvenue, Marie! Vous êtes majeur(e).
Interactive REPL
python -m frython
🐓 Frython v1.0.2 — Python en français, sacré bleu !
🐓 >>> afficher("Ça marche!")
Ça marche!
🐓 >>> quitter()
Au revoir! 👋
📖 Language Reference
Control Flow
| Frython | Python | Description |
|---|---|---|
si |
if |
Condition |
sinon |
else |
Else |
sinonsi |
elif |
Else if |
tantque |
while |
While loop |
pour |
for |
For loop |
dans |
in |
In operator |
casser |
break |
Break |
continuer |
continue |
Continue |
passer |
pass |
Pass |
Definitions
| Frython | Python | Description |
|---|---|---|
déf |
def |
Define function |
retourner |
return |
Return value |
classe |
class |
Define class |
soi |
self |
Current instance |
lambda |
lambda |
Anonymous function |
Special Values
| Frython | Python |
|---|---|
Vrai |
True |
Faux |
False |
Rien |
None |
Built-in Functions
| Frython | Python |
|---|---|
afficher() |
print() |
saisir() |
input() |
longueur() |
len() |
intervalle() |
range() |
trier() |
sorted() |
somme() |
sum() |
maximum() |
max() |
minimum() |
min() |
🛠️ CLI Usage
python -m frython fichier.fy # Run a file
python -m frython # Interactive REPL
python -m frython -t fichier.fy # Show transpiled Python
python -m frython -v fichier.fy # Verbose mode
python -m frython -c "afficher('Hi')" # Run direct code
python -m frython --mots-cles # List all keywords
python -m frython --version # Show version
💡 Examples
Fibonacci
déf fibonacci(n):
si n <= 1:
retourner n
retourner fibonacci(n-1) + fibonacci(n-2)
pour i dans intervalle(10):
afficher(f"F({i}) = {fibonacci(i)}")
Classes
classe Animal:
def __init__(soi, nom):
soi.nom = nom
déf parler(soi):
retourner "..."
classe Chien(Animal):
déf parler(soi):
retourner "Ouaf! 🐕"
rex = Chien("Rex")
afficher(rex.parler())
List Comprehensions
carres = [x**2 pour x dans intervalle(1, 11)]
pairs = [x pour x dans intervalle(20) si x % 2 == 0]
afficher(carres)
afficher(pairs)
🗂️ Project Structure
frython/
├── frython/
│ ├── __init__.py
│ ├── lexeur.py
│ ├── transpileur.py
│ └── interpreteur.py
├── examples/
├── tests/
├── assets/
│ ├── readme_fr.md
│ ├── readme_es.md
│ ├── readme_zh.md
│ ├── readme_hi.md
│ ├── readme_ar.md
│ ├── readme_pt.md
│ ├── readme_ru.md
│ ├── readme_ja.md
│ ├── readme_de.md
│ └── readme_ko.md
├── README.md
├── DOCUMENTATION.md
├── UPDATE.md
└── LICENSE
❓ FAQ
Q: Is it actually usable? A: Yes! Frython transpiles to valid Python. Everything Python can do, Frython can do — in French.
Q: Can I use external Python libraries?
A: Absolutely. importer numpy comme np works perfectly.
Q: Do f-strings work?
A: Yes, and expressions inside {} are also translated.
Q: Why does this exist? A: Pourquoi pas? 🥐
Q: Will my boss accept Frython in production? A: We cannot guarantee the health of your employment.
🤝 Contributing
- Fork the repo
- Create a branch:
git checkout -b feature/my-feature - Run tests:
python -m unittest tests/test_frython.py -v - Commit and push
- Open a Pull Request
📜 License
MIT — Free to use, modify and distribute. Even for pranking colleagues.
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 frython-1.0.9.tar.gz.
File metadata
- Download URL: frython-1.0.9.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d0e4d40491369ac49885a2677513b92cd996c7e3d3a6f8b829194bb7711444d
|
|
| MD5 |
85d880a4de57b00fb408974f3292241d
|
|
| BLAKE2b-256 |
9cdfc0417b541607b4b3ac67582a69c3111f8859ae93791f6fc8a7300a962930
|
Provenance
The following attestation bundles were made for frython-1.0.9.tar.gz:
Publisher:
update_docs.yml on Artleboss2/frython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frython-1.0.9.tar.gz -
Subject digest:
3d0e4d40491369ac49885a2677513b92cd996c7e3d3a6f8b829194bb7711444d - Sigstore transparency entry: 1155568655
- Sigstore integration time:
-
Permalink:
Artleboss2/frython@f16e27cbf839d5d76cfd6b8ab4eb8e7c2699d733 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Artleboss2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
update_docs.yml@f16e27cbf839d5d76cfd6b8ab4eb8e7c2699d733 -
Trigger Event:
push
-
Statement type:
File details
Details for the file frython-1.0.9-py3-none-any.whl.
File metadata
- Download URL: frython-1.0.9-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddfed1ccaaec129ad26c7ac03870d8f17f3fa6bbba7000dbc3c5df3586b80178
|
|
| MD5 |
77793c5af955c608b8690246c638d722
|
|
| BLAKE2b-256 |
15d216f315896ff351978d6362caa40e0747eba3997e7159ae1851c4ce03a3f6
|
Provenance
The following attestation bundles were made for frython-1.0.9-py3-none-any.whl:
Publisher:
update_docs.yml on Artleboss2/frython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frython-1.0.9-py3-none-any.whl -
Subject digest:
ddfed1ccaaec129ad26c7ac03870d8f17f3fa6bbba7000dbc3c5df3586b80178 - Sigstore transparency entry: 1155568660
- Sigstore integration time:
-
Permalink:
Artleboss2/frython@f16e27cbf839d5d76cfd6b8ab4eb8e7c2699d733 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Artleboss2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
update_docs.yml@f16e27cbf839d5d76cfd6b8ab4eb8e7c2699d733 -
Trigger Event:
push
-
Statement type: