warpt 0.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.
- warpt-0.1.0/LICENSE +21 -0
- warpt-0.1.0/MANIFEST.in +2 -0
- warpt-0.1.0/PKG-INFO +70 -0
- warpt-0.1.0/README.md +34 -0
- warpt-0.1.0/pyproject.toml +3 -0
- warpt-0.1.0/setup.cfg +4 -0
- warpt-0.1.0/setup.py +43 -0
- warpt-0.1.0/tests/test_system_info.py +13 -0
- warpt-0.1.0/warpt/__init__.py +2 -0
- warpt-0.1.0/warpt/system_info.py +24 -0
- warpt-0.1.0/warpt.egg-info/PKG-INFO +70 -0
- warpt-0.1.0/warpt.egg-info/SOURCES.txt +14 -0
- warpt-0.1.0/warpt.egg-info/dependency_links.txt +1 -0
- warpt-0.1.0/warpt.egg-info/entry_points.txt +2 -0
- warpt-0.1.0/warpt.egg-info/requires.txt +1 -0
- warpt-0.1.0/warpt.egg-info/top_level.txt +1 -0
warpt-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Your Name
|
|
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.
|
warpt-0.1.0/MANIFEST.in
ADDED
warpt-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: warpt
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple package to gather system OS and memory info
|
|
5
|
+
Home-page: https://github.com/edawson/warpt
|
|
6
|
+
Author: Eric T. Dawson
|
|
7
|
+
Author-email: eric@betulalabs.com
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/edawson/warpt/issues
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Topic :: System :: Monitoring
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Requires-Python: >=3.6
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: psutil>=5.8.0
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
Dynamic: project-url
|
|
33
|
+
Dynamic: requires-dist
|
|
34
|
+
Dynamic: requires-python
|
|
35
|
+
Dynamic: summary
|
|
36
|
+
|
|
37
|
+
# warpt
|
|
38
|
+
|
|
39
|
+
A simple Python package to gather system OS and memory information.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install warpt
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from warpt import get_os_info, get_memory_info
|
|
51
|
+
|
|
52
|
+
# Get OS information
|
|
53
|
+
os_info = get_os_info()
|
|
54
|
+
print(os_info)
|
|
55
|
+
# {'system': 'Darwin', 'node': 'MacBook-Pro', 'release': '23.5.0', ...}
|
|
56
|
+
|
|
57
|
+
# Get memory information
|
|
58
|
+
mem_info = get_memory_info()
|
|
59
|
+
print(mem_info)
|
|
60
|
+
# {'total': 17179869184, 'available': 5367709696, 'percent': 68.8, ...}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Requirements
|
|
64
|
+
|
|
65
|
+
- Python 3.6+
|
|
66
|
+
- psutil
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT
|
warpt-0.1.0/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# warpt
|
|
2
|
+
|
|
3
|
+
A simple Python package to gather system OS and memory information.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install warpt
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from warpt import get_os_info, get_memory_info
|
|
15
|
+
|
|
16
|
+
# Get OS information
|
|
17
|
+
os_info = get_os_info()
|
|
18
|
+
print(os_info)
|
|
19
|
+
# {'system': 'Darwin', 'node': 'MacBook-Pro', 'release': '23.5.0', ...}
|
|
20
|
+
|
|
21
|
+
# Get memory information
|
|
22
|
+
mem_info = get_memory_info()
|
|
23
|
+
print(mem_info)
|
|
24
|
+
# {'total': 17179869184, 'available': 5367709696, 'percent': 68.8, ...}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- Python 3.6+
|
|
30
|
+
- psutil
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT
|
warpt-0.1.0/setup.cfg
ADDED
warpt-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
# Read README for long description
|
|
4
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
5
|
+
long_description = fh.read()
|
|
6
|
+
|
|
7
|
+
setup(
|
|
8
|
+
name='warpt',
|
|
9
|
+
version='0.1.0',
|
|
10
|
+
description='A simple package to gather system OS and memory info',
|
|
11
|
+
long_description=long_description,
|
|
12
|
+
long_description_content_type="text/markdown",
|
|
13
|
+
author='Eric T. Dawson',
|
|
14
|
+
author_email='eric@betulalabs.com',
|
|
15
|
+
packages=find_packages(),
|
|
16
|
+
install_requires=[
|
|
17
|
+
'psutil>=5.8.0',
|
|
18
|
+
],
|
|
19
|
+
python_requires='>=3.6',
|
|
20
|
+
url='https://github.com/edawson/warpt',
|
|
21
|
+
project_urls={
|
|
22
|
+
"Bug Tracker": "https://github.com/edawson/warpt/issues",
|
|
23
|
+
},
|
|
24
|
+
classifiers=[
|
|
25
|
+
'Development Status :: 3 - Alpha',
|
|
26
|
+
'Intended Audience :: Developers',
|
|
27
|
+
'Topic :: System :: Monitoring',
|
|
28
|
+
'License :: OSI Approved :: MIT License',
|
|
29
|
+
'Programming Language :: Python :: 3',
|
|
30
|
+
'Programming Language :: Python :: 3.6',
|
|
31
|
+
'Programming Language :: Python :: 3.7',
|
|
32
|
+
'Programming Language :: Python :: 3.8',
|
|
33
|
+
'Programming Language :: Python :: 3.9',
|
|
34
|
+
'Programming Language :: Python :: 3.10',
|
|
35
|
+
'Programming Language :: Python :: 3.11',
|
|
36
|
+
'Operating System :: OS Independent',
|
|
37
|
+
],
|
|
38
|
+
entry_points={
|
|
39
|
+
'console_scripts': [
|
|
40
|
+
'warpt=warpt.cli:main',
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from .system_info import get_os_info, get_memory_info
|
|
2
|
+
|
|
3
|
+
def test_get_os_info():
|
|
4
|
+
info = get_os_info()
|
|
5
|
+
assert 'system' in info
|
|
6
|
+
assert 'release' in info
|
|
7
|
+
assert isinstance(info['system'], str)
|
|
8
|
+
|
|
9
|
+
def test_get_memory_info():
|
|
10
|
+
mem = get_memory_info()
|
|
11
|
+
assert 'total' in mem
|
|
12
|
+
assert 'available' in mem
|
|
13
|
+
assert mem['total'] > 0
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import platform
|
|
2
|
+
import psutil
|
|
3
|
+
|
|
4
|
+
def get_os_info():
|
|
5
|
+
"""Return basic OS information as a dictionary."""
|
|
6
|
+
return {
|
|
7
|
+
'system': platform.system(),
|
|
8
|
+
'node': platform.node(),
|
|
9
|
+
'release': platform.release(),
|
|
10
|
+
'version': platform.version(),
|
|
11
|
+
'machine': platform.machine(),
|
|
12
|
+
'processor': platform.processor(),
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
def get_memory_info():
|
|
16
|
+
"""Return memory information as a dictionary (requires psutil)."""
|
|
17
|
+
mem = psutil.virtual_memory()
|
|
18
|
+
return {
|
|
19
|
+
'total': mem.total,
|
|
20
|
+
'available': mem.available,
|
|
21
|
+
'percent': mem.percent,
|
|
22
|
+
'used': mem.used,
|
|
23
|
+
'free': mem.free,
|
|
24
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: warpt
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple package to gather system OS and memory info
|
|
5
|
+
Home-page: https://github.com/edawson/warpt
|
|
6
|
+
Author: Eric T. Dawson
|
|
7
|
+
Author-email: eric@betulalabs.com
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/edawson/warpt/issues
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Topic :: System :: Monitoring
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Requires-Python: >=3.6
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: psutil>=5.8.0
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
Dynamic: project-url
|
|
33
|
+
Dynamic: requires-dist
|
|
34
|
+
Dynamic: requires-python
|
|
35
|
+
Dynamic: summary
|
|
36
|
+
|
|
37
|
+
# warpt
|
|
38
|
+
|
|
39
|
+
A simple Python package to gather system OS and memory information.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install warpt
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from warpt import get_os_info, get_memory_info
|
|
51
|
+
|
|
52
|
+
# Get OS information
|
|
53
|
+
os_info = get_os_info()
|
|
54
|
+
print(os_info)
|
|
55
|
+
# {'system': 'Darwin', 'node': 'MacBook-Pro', 'release': '23.5.0', ...}
|
|
56
|
+
|
|
57
|
+
# Get memory information
|
|
58
|
+
mem_info = get_memory_info()
|
|
59
|
+
print(mem_info)
|
|
60
|
+
# {'total': 17179869184, 'available': 5367709696, 'percent': 68.8, ...}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Requirements
|
|
64
|
+
|
|
65
|
+
- Python 3.6+
|
|
66
|
+
- psutil
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
setup.py
|
|
6
|
+
tests/test_system_info.py
|
|
7
|
+
warpt/__init__.py
|
|
8
|
+
warpt/system_info.py
|
|
9
|
+
warpt.egg-info/PKG-INFO
|
|
10
|
+
warpt.egg-info/SOURCES.txt
|
|
11
|
+
warpt.egg-info/dependency_links.txt
|
|
12
|
+
warpt.egg-info/entry_points.txt
|
|
13
|
+
warpt.egg-info/requires.txt
|
|
14
|
+
warpt.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
psutil>=5.8.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
warpt
|