App Creator Location 🌍
Une application Django + CLI pour récupérer la géolocalisation de l'utilisateur via son adresse IP (https://ipinfo.io).
📦 Installation
pip install app-creator-location
Utilisation CLI
get-location
Utilisation Django
'app_creator',
Depuis PyPI (si publié) :
pip install app-creator-location
▶️ Utilisation en ligne de commande :
------------------------------------------------------------
Tape simplement :
get-location
Résultat :
IP: 255.255. 255.255
Ville: Abidjan
Région: Abidjan
Pays: CIV
Localisation: Région des lagunes au sud de la Côte d'Ivoire
Fournisseur: Orange.CI
------------------------------------------------------------
🌐 Intégration dans un projet Django :
------------------------------------------------------------
1. Ajouter `app_creator` dans `INSTALLED_APPS` :
INSTALLED_APPS = [
...
'app_creator',
]
2. Inclure les routes dans `urls.py` du projet :
from django.urls import include, path
urlpatterns = [
...
path('', include('app_creator.urls')),
]
3. Accéder à la route `/ip/` dans votre navigateur :
http://localhost:8000/ip/
Exemple de réponse JSON :
{
"ip": "255.255. 255.255",
"city": "Abidjan",
"region": "Abidjan",
"country": "CIV",
"loc": "Région des lagunes au sud de la Côte d'Ivoire",
"org": "Orange.CI."
}
------------------------------------------------------------
📂 Structure du package :
------------------------------------------------------------
app_creator/
├── __init__.py
├── cli.py → Script CLI
├── views.py → Vue Django (JSON)
├── urls.py → Routes Django
setup.py → Configuration package
README.txt → Ce fichier
LICENSE → Licence MIT ou autre
MANIFEST.in → (si fichiers statiques)
pyproject.toml → (facultatif, version moderne)
------------------------------------------------------------
📤 Publication sur PyPI (rappel) :
------------------------------------------------------------
1. Installer les outils :
pip install build twine
2. Créer les fichiers :
python setup.py sdist bdist_wheel
3. Publier :
twine upload dist/*
------------------------------------------------------------
👤 Auteur :
------------------------------------------------------------
Nom : Traoré Souleymane Almami
Email : trasouleymane980@gmail.com
GitHub : https://github.com/
------------------------------------------------------------
📝 Licence :
------------------------------------------------------------
Ce projet est sous licence MIT. Voir le fichier LICENSE.
Metadata
Release files for app-creator-location 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| app_creator_location-0.1.1.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| app_creator_location-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / app_creator_location-0.1.1.tar.gz
| Download URL | app_creator_location-0.1.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7af838cb43f8feb96dbd5e047307b87085599b28e355609ced60f76f27940461
|
|
BLAKE2b-256 checksum How to use checksums |
e5edfdc9d6715a1c5c53eb94a0da6f3caf809f67cfdb9c3a31846c55f3d9f186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / app_creator_location-0.1.1-py3-none-any.whl
| Download URL | app_creator_location-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2989b19833b77fd0f23205cee79185469ab013052a90e08829a050ee3577d3a3
|
|
BLAKE2b-256 checksum How to use checksums |
1d6715363c6e4d4b571f64f30989c2fd1f51557d89f654dfa129d2cb8d4722b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|