Update requirements and switch from Pipenv to venv
This commit is contained in:
12
Pipfile
12
Pipfile
@ -1,12 +0,0 @@
|
||||
[[source]]
|
||||
url = "https://pypi.python.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
pyowm = "*"
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[requires]
|
||||
python_version = "3.7"
|
75
Pipfile.lock
generated
75
Pipfile.lock
generated
@ -1,75 +0,0 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "90ab82af397550e8743df5673adc3a1ad7f261129395971bee308376aaff8fd9"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_version": "3.7"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.python.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:e4f3620cfea4f83eedc95b24abd9cd56f3c4b146dd0177e83a21b4eb49e21e50",
|
||||
"sha256:fd7c7c74727ddcf00e9acd26bba8da604ffec95bf1c2144e67aff7a8b50e6cef"
|
||||
],
|
||||
"version": "==2019.9.11"
|
||||
},
|
||||
"chardet": {
|
||||
"hashes": [
|
||||
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
|
||||
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
|
||||
],
|
||||
"version": "==3.0.4"
|
||||
},
|
||||
"geojson": {
|
||||
"hashes": [
|
||||
"sha256:6e4bb7ace4226a45d9c8c8b1348b3fc43540658359f93c3f7e03efa9f15f658a",
|
||||
"sha256:ccbd13368dd728f4e4f13ffe6aaf725b6e802c692ba0dde628be475040c534ba"
|
||||
],
|
||||
"version": "==2.5.0"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
|
||||
"sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
|
||||
],
|
||||
"version": "==2.8"
|
||||
},
|
||||
"pyowm": {
|
||||
"hashes": [
|
||||
"sha256:1c51334a9bcd697993d4c68e5437d5f420d33dd7f5d872b2ad93c3c47b7a9649",
|
||||
"sha256:2ac88777565518b9e9aa3fc172c543ada4cbfc667d83775cd17c0e52ea6ccc86",
|
||||
"sha256:43d49901493a883335855d8dbd16f8aa0d2e26e0183b6b6fe8a5471904c0e37a",
|
||||
"sha256:805bd2f42e15770c0d2822b77add7770685cb94cfbeae8633328d0d522332fd7",
|
||||
"sha256:8fd41a18536f4d6c432bc6d9ea69994efb1ea9b43688cf19523659b6f4d86cf7",
|
||||
"sha256:b3294065a08417b4b0367fc424a77a0caafa24df8fd842ba9b08f1b5542c092e"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.10.0"
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4",
|
||||
"sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"
|
||||
],
|
||||
"version": "==2.22.0"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:3de946ffbed6e6746608990594d08faac602528ac7015ac28d33cee6a45b7398",
|
||||
"sha256:9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86"
|
||||
],
|
||||
"version": "==1.25.6"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
}
|
20
README.md
20
README.md
@ -5,9 +5,15 @@ A simple script that sends [OpenWeatherMap](https://openweathermap.org/) forecas
|
||||
|
||||
To run the script you need to fill in `config.sample.json` and to rename it to `config.json`.
|
||||
|
||||
You will need a [API key from OWM](https://home.openweathermap.org/api_keys), and [one from FreeMobile](https://www.freenews.fr/freenews-edition-nationale-299/free-mobile-170/nouvelle-option-notifications-par-sms-chez-free-mobile-14817).
|
||||
You will need a [API key from OWM](https://home.openweathermap.org/api_keys), and [one from FreeMobile](https://www.universfreebox.com/article/26337/Nouveau-Free-Mobile-lance-un-systeme-de-notification-SMS-pour-vos-appareils-connectes).
|
||||
|
||||
See `Pipfile` for the script's requirements for instance by running `pipenv install` (you probably only need to install `pyowm`).
|
||||
See `requirements.txt` for the script's requirements. A quick way to set is up is by running, from the script’s directory:
|
||||
```
|
||||
python -m venv .venv
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
```
|
||||
|
||||
You can then run the script using `.venv/bin/python weather_to_freemobile.py`
|
||||
|
||||
Sample output:
|
||||
```
|
||||
@ -25,9 +31,15 @@ Un simple script pour envoyer les prévisions météo [OpenWeatherMap](https://o
|
||||
|
||||
Pour lancer le script, vous avez besoin d'ajuster les éléments du fichier `config.sample.json` et le renommer en `config.json`.
|
||||
|
||||
Vous aurez besoin d'une [clef API OpenWeatherMap](https://home.openweathermap.org/api_keys), et une [clef API SMS FreeMobile](https://www.freenews.fr/freenews-edition-nationale-299/free-mobile-170/nouvelle-option-notifications-par-sms-chez-free-mobile-14817).
|
||||
Vous aurez besoin d’une [clef API OpenWeatherMap](https://home.openweathermap.org/api_keys), et une [clef API SMS FreeMobile](https://www.universfreebox.com/article/26337/Nouveau-Free-Mobile-lance-un-systeme-de-notification-SMS-pour-vos-appareils-connectes).
|
||||
|
||||
Vous devrez installer les librairies décrites dans `Pipfile` par exemple en exécutant `pipenv install` (a priori vous aurez uniquement besoin de `pyowm`).
|
||||
Le fichier `requirements.txt` vous donne les dépendances à installer pour le script. Vous pouvez configurer en environnement en lançant les commandes suivantes depuis le répertoire du script:
|
||||
```
|
||||
python -m venv .venv
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Pour lancer le script, utilisez `.venv/bin/python weather_to_freemobile.py`
|
||||
|
||||
Exemple de SMS:
|
||||
```
|
||||
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
pyowm==2.10.0
|
Reference in New Issue
Block a user