| Name | sji JSON |
| Version |
0.1.3
JSON |
| download |
| home_page | https://github.com/matzek92/simple-job-init |
| Summary | SJI - Eine einfache Python-Bibliothek für Job-Initialisierung |
| upload_time | 2025-09-08 12:59:13 |
| maintainer | None |
| docs_url | None |
| author | matzek92 |
| requires_python | >=3.8 |
| license | MIT License
Copyright (c) 2025 matzek92
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
| keywords |
job
task
simple
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
GitPython
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# SJI
Eine einfache Python-Bibliothek für die Initialisierung von Jobs/Skripten (Logging, Konfiguration, Ordnerstruktur).
## Installation
```bash
pip install sji
```
## Verwendung
```python
from sji import SimpleJobInit
# __file__ an SimpleJobInit übergeben
sji = SimpleJobInit(__file__)
# Logger verwenden
sji.logger.info("Starte Job...")
# Konfiguration lesen (INI)
cfg = sji.config
value = cfg.get('section', 'key', fallback='default')
# Persistente Datei-Pfade erhalten
csv_path = sji.get_persistent_file_path('csv')
```
Dabei werden automatisch erzeugt/genutzt:
- logs/<skriptname>.log (mit optionaler Rotation)
- tmp/ Verzeichnis
- <skriptname>.config.ini für Einstellungen
## Minimalbeispiel für die INI-Datei
Datei: `<skriptname>.config.ini` im selben Verzeichnis wie das Skript
```ini
[logging]
level = INFO
log_rotation_when = midnight
log_rotation_backup_count = 7
[section]
key = some-value
```
## API
### Klasse: SimpleJobInit
- `SimpleJobInit(script_file_path: str)`
- Initialisiert Logging, lädt/prüft INI-Config, erzeugt Ordner (logs, tmp)
- Eigenschaften
- `logger`: konfigurierter `logging.Logger`
- `config`: `configparser.ConfigParser`
- Methoden
- `get_persistent_file_path(file_ending: str) -> str`: gibt Pfad `<skriptname>.<file_ending>` zurück
## Lizenz
MIT-Lizenz - siehe [LICENSE](LICENSE) für Details.
- Project build with support of AI (Cursor IDE).
Raw data
{
"_id": null,
"home_page": "https://github.com/matzek92/simple-job-init",
"name": "sji",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "job, task, simple",
"author": "matzek92",
"author_email": "matzek92 <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/c3/ba/592bdd9cf9c080f47686005521eaba5dd87879b4a420c94113022a957a50/sji-0.1.3.tar.gz",
"platform": null,
"description": "# SJI\r\n\r\nEine einfache Python-Bibliothek f\u00fcr die Initialisierung von Jobs/Skripten (Logging, Konfiguration, Ordnerstruktur).\r\n\r\n## Installation\r\n\r\n```bash\r\npip install sji\r\n```\r\n\r\n## Verwendung\r\n\r\n```python\r\nfrom sji import SimpleJobInit\r\n\r\n# __file__ an SimpleJobInit \u00fcbergeben\r\nsji = SimpleJobInit(__file__)\r\n\r\n# Logger verwenden\r\nsji.logger.info(\"Starte Job...\")\r\n\r\n# Konfiguration lesen (INI)\r\ncfg = sji.config\r\nvalue = cfg.get('section', 'key', fallback='default')\r\n\r\n# Persistente Datei-Pfade erhalten\r\ncsv_path = sji.get_persistent_file_path('csv')\r\n```\r\n\r\nDabei werden automatisch erzeugt/genutzt:\r\n- logs/<skriptname>.log (mit optionaler Rotation)\r\n- tmp/ Verzeichnis\r\n- <skriptname>.config.ini f\u00fcr Einstellungen\r\n\r\n## Minimalbeispiel f\u00fcr die INI-Datei\r\n\r\nDatei: `<skriptname>.config.ini` im selben Verzeichnis wie das Skript\r\n\r\n```ini\r\n[logging]\r\nlevel = INFO\r\nlog_rotation_when = midnight\r\nlog_rotation_backup_count = 7\r\n\r\n[section]\r\nkey = some-value\r\n```\r\n\r\n## API\r\n\r\n### Klasse: SimpleJobInit\r\n\r\n- `SimpleJobInit(script_file_path: str)`\r\n - Initialisiert Logging, l\u00e4dt/pr\u00fcft INI-Config, erzeugt Ordner (logs, tmp)\r\n- Eigenschaften\r\n - `logger`: konfigurierter `logging.Logger`\r\n - `config`: `configparser.ConfigParser`\r\n- Methoden\r\n - `get_persistent_file_path(file_ending: str) -> str`: gibt Pfad `<skriptname>.<file_ending>` zur\u00fcck\r\n\r\n## Lizenz\r\n\r\nMIT-Lizenz - siehe [LICENSE](LICENSE) f\u00fcr Details.\r\n\r\n- Project build with support of AI (Cursor IDE). \r\n",
"bugtrack_url": null,
"license": "MIT License\r\n \r\n Copyright (c) 2025 matzek92\r\n \r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n \r\n The above copyright notice and this permission notice shall be included in all\r\n copies or substantial portions of the Software.\r\n \r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n SOFTWARE.\r\n ",
"summary": "SJI - Eine einfache Python-Bibliothek f\u00fcr Job-Initialisierung",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/matzek92/simple-job-init",
"Repository": "https://github.com/matzek92/simple-job-init.git"
},
"split_keywords": [
"job",
" task",
" simple"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1071e89e7c292abad2024e668b1b60a35b1e9afdfcdfc6d605cdcc1555f945fc",
"md5": "c00cfe813c1f330a69758ee2c947f338",
"sha256": "8039335efae97fff1740e2e6cc75e880260a15451b5078c23bdc474a52275126"
},
"downloads": -1,
"filename": "sji-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c00cfe813c1f330a69758ee2c947f338",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5709,
"upload_time": "2025-09-08T12:59:12",
"upload_time_iso_8601": "2025-09-08T12:59:12.997365Z",
"url": "https://files.pythonhosted.org/packages/10/71/e89e7c292abad2024e668b1b60a35b1e9afdfcdfc6d605cdcc1555f945fc/sji-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c3ba592bdd9cf9c080f47686005521eaba5dd87879b4a420c94113022a957a50",
"md5": "230fc147db087329e1d5c4f8750efdea",
"sha256": "406ad6e0290dc2f2272b41dea9087117de0346d2a6651a7998bc32371855df6f"
},
"downloads": -1,
"filename": "sji-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "230fc147db087329e1d5c4f8750efdea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5107,
"upload_time": "2025-09-08T12:59:13",
"upload_time_iso_8601": "2025-09-08T12:59:13.862580Z",
"url": "https://files.pythonhosted.org/packages/c3/ba/592bdd9cf9c080f47686005521eaba5dd87879b4a420c94113022a957a50/sji-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-08 12:59:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "matzek92",
"github_project": "simple-job-init",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "GitPython",
"specs": [
[
">=",
"3.1.0"
]
]
}
],
"lcname": "sji"
}