cjn-PiTools 1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. cjn_pitools-1.0/LICENSE +21 -0
  2. cjn_pitools-1.0/PKG-INFO +84 -0
  3. cjn_pitools-1.0/README.md +63 -0
  4. cjn_pitools-1.0/pyproject.toml +53 -0
  5. cjn_pitools-1.0/setup.cfg +4 -0
  6. cjn_pitools-1.0/src/cjn_PiTools/DS18B20.py +723 -0
  7. cjn_pitools-1.0/src/cjn_PiTools/PiBlinky.py +144 -0
  8. cjn_pitools-1.0/src/cjn_PiTools/PiOLED.py +554 -0
  9. cjn_pitools-1.0/src/cjn_PiTools/__init__.py +0 -0
  10. cjn_pitools-1.0/src/cjn_PiTools/deployment_files/PiOLED_server.cfg +55 -0
  11. cjn_pitools-1.0/src/cjn_PiTools/deployment_files/PiOLED_server.service +10 -0
  12. cjn_pitools-1.0/src/cjn_PiTools/deployment_files/initW1buses.service +21 -0
  13. cjn_pitools-1.0/src/cjn_PiTools/fonts/C&C Red Alert [INET].ttf +0 -0
  14. cjn_pitools-1.0/src/cjn_PiTools/fonts/ChiKareGo.ttf +0 -0
  15. cjn_pitools-1.0/src/cjn_PiTools/fonts/FreePixel.ttf +0 -0
  16. cjn_pitools-1.0/src/cjn_PiTools/fonts/GLECB.TTF +0 -0
  17. cjn_pitools-1.0/src/cjn_PiTools/fonts/ProggyTiny.ttf +0 -0
  18. cjn_pitools-1.0/src/cjn_PiTools/fonts/README [INET].txt +96 -0
  19. cjn_pitools-1.0/src/cjn_PiTools/fonts/Volter__28Goldfish_29.ttf +0 -0
  20. cjn_pitools-1.0/src/cjn_PiTools/fonts/code2000.ttf +0 -0
  21. cjn_pitools-1.0/src/cjn_PiTools/fonts/creep.bdf +11014 -0
  22. cjn_pitools-1.0/src/cjn_PiTools/fonts/fontawesome-webfont.ttf +0 -0
  23. cjn_pitools-1.0/src/cjn_PiTools/fonts/miscfs_.ttf +0 -0
  24. cjn_pitools-1.0/src/cjn_PiTools/fonts/pixelmix.ttf +0 -0
  25. cjn_pitools-1.0/src/cjn_PiTools/fonts/tiny.ttf +0 -0
  26. cjn_pitools-1.0/src/cjn_PiTools/initW1buses.py +97 -0
  27. cjn_pitools-1.0/src/cjn_PiTools.egg-info/PKG-INFO +84 -0
  28. cjn_pitools-1.0/src/cjn_PiTools.egg-info/SOURCES.txt +30 -0
  29. cjn_pitools-1.0/src/cjn_PiTools.egg-info/dependency_links.txt +1 -0
  30. cjn_pitools-1.0/src/cjn_PiTools.egg-info/entry_points.txt +4 -0
  31. cjn_pitools-1.0/src/cjn_PiTools.egg-info/requires.txt +8 -0
  32. cjn_pitools-1.0/src/cjn_PiTools.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chris Nelson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,84 @@
1
+ Metadata-Version: 2.4
2
+ Name: cjn_PiTools
3
+ Version: 1.0
4
+ Summary: cjn's library of Raspberry Pi functions, drivers, tools, ...
5
+ Author-email: Chris Nelson <github@cjnaz.com>
6
+ License-Expression: MIT
7
+ Project-URL: repository, https://github.com/cjnaz/cjn_PiTools
8
+ Keywords: cjnaz,library,cjnfuncs
9
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: cjnfuncs>=3.1.1
14
+ Requires-Dist: luma.oled
15
+ Requires-Dist: pillow
16
+ Requires-Dist: spidev
17
+ Requires-Dist: RPi.GPIO
18
+ Provides-Extra: pigpio
19
+ Requires-Dist: pigpio; extra == "pigpio"
20
+ Dynamic: license-file
21
+
22
+ # cjn_PiTools - A collection of modules for Raspberry Pi projects
23
+
24
+ ## cjn_PiTools is comprised of several modules (follow links to respective documentation)
25
+
26
+ NOTE: These link point to the github repo since relative links to other .md files do not work on PyPI.
27
+
28
+ Module | Description/Purpose
29
+ --|--
30
+ [PiBlinky](https://github.com/cjnaz/cjn_PiTools/blob/main/PiBlinky.md) | A multiple threaded LED driver for Raspberry Pi
31
+ [PiOLED](https://github.com/cjnaz/cjn_PiTools/blob/main/PiOLED.md) | Display multi-line messages on a shared Raspberry Pi connected OLED display
32
+ [DS18B20](https://github.com/cjnaz/cjn_PiTools/blob/main/DS18B20.md) | A high-featured library/driver using the w1_therm kernel driver
33
+ [initW1buses](https://github.com/cjnaz/cjn_PiTools/blob/main/initW1buses.md) | Initialize the W1 buses and set write permission on found therm_bulk_read file(s)
34
+
35
+ More to come!
36
+ - Drivers for SHT3x and HTU21D temp/RH sensors
37
+ - Driver for ADC121C027 ADC
38
+ - Driver for MCP23008 IO expander
39
+ - Driver for PCA9548s I2C expander
40
+
41
+ In most cases, these drivers will work with both `RPi.GPIO` (for local control) and `pigpio` for (local and remote control).
42
+
43
+ Developed and tested on Raspbian GNU/Linux 11 (bullseye) and Python 3.9.2, and supported on all higher versions.
44
+
45
+ In this documentation, "tool script" refers to a Python project that imports and uses cjn_PiTools. Some may be simple scripts, and others may themselves be installed packages.
46
+
47
+ <br/>
48
+
49
+ ## Installation and usage
50
+
51
+ If using the RPi.GPIO driver:
52
+
53
+ pip install cjn_PiTools
54
+
55
+
56
+ If using the pigpio driver:
57
+
58
+ pip install cjn_PiTools[pigpio]
59
+
60
+ - And you will also need to install the pigpiod daemon (`sudo apt install pigpiod`) and start it manually or at boot. Here's a systemd service file for starting pigpiod at boot:
61
+
62
+ [Unit]
63
+ Description=Daemon required to control GPIO pins via pigpio
64
+
65
+ [Service]
66
+ ExecStart=/usr/local/bin/pigpiod -l
67
+ Type=forking
68
+ TimeoutStopSec=20
69
+
70
+ [Install]
71
+ WantedBy=multi-user.target
72
+
73
+
74
+
75
+ <br/>
76
+
77
+ ## Key changes since the prior major public release (this is the first release)
78
+
79
+ - New. Bundled PiBlinky, PiOLED, initW1buses, and DS18B20 modules
80
+
81
+ <br/>
82
+
83
+ ## Revision history
84
+ - 1.0 260207 - New. Bundled PiBlinky, PiOLED, initW1buses, and DS18B20 modules
@@ -0,0 +1,63 @@
1
+ # cjn_PiTools - A collection of modules for Raspberry Pi projects
2
+
3
+ ## cjn_PiTools is comprised of several modules (follow links to respective documentation)
4
+
5
+ NOTE: These link point to the github repo since relative links to other .md files do not work on PyPI.
6
+
7
+ Module | Description/Purpose
8
+ --|--
9
+ [PiBlinky](https://github.com/cjnaz/cjn_PiTools/blob/main/PiBlinky.md) | A multiple threaded LED driver for Raspberry Pi
10
+ [PiOLED](https://github.com/cjnaz/cjn_PiTools/blob/main/PiOLED.md) | Display multi-line messages on a shared Raspberry Pi connected OLED display
11
+ [DS18B20](https://github.com/cjnaz/cjn_PiTools/blob/main/DS18B20.md) | A high-featured library/driver using the w1_therm kernel driver
12
+ [initW1buses](https://github.com/cjnaz/cjn_PiTools/blob/main/initW1buses.md) | Initialize the W1 buses and set write permission on found therm_bulk_read file(s)
13
+
14
+ More to come!
15
+ - Drivers for SHT3x and HTU21D temp/RH sensors
16
+ - Driver for ADC121C027 ADC
17
+ - Driver for MCP23008 IO expander
18
+ - Driver for PCA9548s I2C expander
19
+
20
+ In most cases, these drivers will work with both `RPi.GPIO` (for local control) and `pigpio` for (local and remote control).
21
+
22
+ Developed and tested on Raspbian GNU/Linux 11 (bullseye) and Python 3.9.2, and supported on all higher versions.
23
+
24
+ In this documentation, "tool script" refers to a Python project that imports and uses cjn_PiTools. Some may be simple scripts, and others may themselves be installed packages.
25
+
26
+ <br/>
27
+
28
+ ## Installation and usage
29
+
30
+ If using the RPi.GPIO driver:
31
+
32
+ pip install cjn_PiTools
33
+
34
+
35
+ If using the pigpio driver:
36
+
37
+ pip install cjn_PiTools[pigpio]
38
+
39
+ - And you will also need to install the pigpiod daemon (`sudo apt install pigpiod`) and start it manually or at boot. Here's a systemd service file for starting pigpiod at boot:
40
+
41
+ [Unit]
42
+ Description=Daemon required to control GPIO pins via pigpio
43
+
44
+ [Service]
45
+ ExecStart=/usr/local/bin/pigpiod -l
46
+ Type=forking
47
+ TimeoutStopSec=20
48
+
49
+ [Install]
50
+ WantedBy=multi-user.target
51
+
52
+
53
+
54
+ <br/>
55
+
56
+ ## Key changes since the prior major public release (this is the first release)
57
+
58
+ - New. Bundled PiBlinky, PiOLED, initW1buses, and DS18B20 modules
59
+
60
+ <br/>
61
+
62
+ ## Revision history
63
+ - 1.0 260207 - New. Bundled PiBlinky, PiOLED, initW1buses, and DS18B20 modules
@@ -0,0 +1,53 @@
1
+ [project]
2
+ name = 'cjn_PiTools'
3
+ version = "1.0"
4
+ # 1.0 - New. Bundled PiBlinky, PiOLED, initW1buses, and DS18B20 modules
5
+ description = "cjn's library of Raspberry Pi functions, drivers, tools, ..."
6
+ readme = "README.md"
7
+ requires-python = ">=3.9"
8
+ authors = [ {name = "Chris Nelson", email = "github@cjnaz.com"} ]
9
+ license = "MIT"
10
+ dependencies = [
11
+ 'cjnfuncs >= 3.1.1',
12
+ 'luma.oled',
13
+ 'pillow',
14
+ 'spidev',
15
+ 'RPi.GPIO',
16
+ ]
17
+ keywords = ['cjnaz', 'library', 'cjnfuncs']
18
+ classifiers = [ # https://pypi.org/classifiers/
19
+ "Topic :: Software Development :: Libraries :: Python Modules",
20
+ ]
21
+
22
+
23
+ [project.optional-dependencies]
24
+ pigpio = [
25
+ "pigpio",
26
+ ]
27
+
28
+
29
+ [build-system]
30
+ requires = ["setuptools"]
31
+ build-backend = "setuptools.build_meta"
32
+
33
+
34
+ [project.scripts]
35
+ PiOLED = 'cjn_PiTools.PiOLED:cli'
36
+ DS18B20 = 'cjn_PiTools.DS18B20:cli'
37
+ initW1buses = 'cjn_PiTools.initW1buses:cli'
38
+
39
+
40
+ [project.urls]
41
+ repository = "https://github.com/cjnaz/cjn_PiTools"
42
+
43
+
44
+ [tool.setuptools.packages.find]
45
+ where = ["src"]
46
+
47
+
48
+ [tool.setuptools]
49
+ include-package-data = true
50
+
51
+
52
+ [tool.setuptools.package-data]
53
+ '*' = ['fonts/*', 'deployment_files/*']
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+