everycode 1.0.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.
- everycode-1.0.0/PKG-INFO +59 -0
- everycode-1.0.0/README.md +50 -0
- everycode-1.0.0/__init__.py +886 -0
- everycode-1.0.0/everycode/__init__.py +886 -0
- everycode-1.0.0/everycode.egg-info/PKG-INFO +59 -0
- everycode-1.0.0/everycode.egg-info/SOURCES.txt +8 -0
- everycode-1.0.0/everycode.egg-info/dependency_links.txt +1 -0
- everycode-1.0.0/everycode.egg-info/top_level.txt +1 -0
- everycode-1.0.0/pyproject.toml +15 -0
- everycode-1.0.0/setup.cfg +4 -0
everycode-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: everycode
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A friendly collection of everyday Python helper commands
|
|
5
|
+
Author: Everycode contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# everycode
|
|
11
|
+
|
|
12
|
+
Everycode is a beginner-friendly Python helper library with date and time,
|
|
13
|
+
math, geometry, conversions, text tools, list helpers, validation, random
|
|
14
|
+
utilities, and opt-in harmless joke functions. It uses only Python's standard
|
|
15
|
+
library and does nothing when imported.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
From this folder:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python -m pip install .
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
import everycode as ec
|
|
29
|
+
|
|
30
|
+
ec.time() # prints the time and also returns it
|
|
31
|
+
ec.year() # prints the current year
|
|
32
|
+
ec.date() # prints YYYY-MM-DD
|
|
33
|
+
ec.datetime() # prints local date and time
|
|
34
|
+
ec.add(4, 5) # prints 9 and returns 9
|
|
35
|
+
ec.celsius_to_fahrenheit(20)
|
|
36
|
+
ec.prank_pun() # prints a harmless joke and returns it
|
|
37
|
+
|
|
38
|
+
ec.help() # categorized list of every command
|
|
39
|
+
ec.help("add") # details about one command
|
|
40
|
+
|
|
41
|
+
ec.sklang() # switch subsequent messages/help to Slovak
|
|
42
|
+
ec.prank_reversed("Ahoj!")
|
|
43
|
+
ec.enlang() # switch back to English
|
|
44
|
+
ec.json_dumps({"name": "Everycode"})
|
|
45
|
+
ec.url_encode("hello world")
|
|
46
|
+
ec.new_id()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
English is the default language. `ec.sklang()` and `ec.enlang()` change the
|
|
50
|
+
language used by help and localized text helpers for the rest of the program.
|
|
51
|
+
These two language switches are intentionally omitted from `ec.help()`.
|
|
52
|
+
|
|
53
|
+
Commands shown by `ec.help()` print their result automatically and also return
|
|
54
|
+
it, so you can still save it in a variable, for example `answer = ec.add(4, 5)`.
|
|
55
|
+
The helper `ec.commands()` returns a mapping of command names to descriptions.
|
|
56
|
+
The language switches only change the language used by supported text outputs;
|
|
57
|
+
they do not print anything themselves.
|
|
58
|
+
|
|
59
|
+
See [PUBLISHING.md](PUBLISHING.md) for the step-by-step PyPI publishing guide.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# everycode
|
|
2
|
+
|
|
3
|
+
Everycode is a beginner-friendly Python helper library with date and time,
|
|
4
|
+
math, geometry, conversions, text tools, list helpers, validation, random
|
|
5
|
+
utilities, and opt-in harmless joke functions. It uses only Python's standard
|
|
6
|
+
library and does nothing when imported.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
From this folder:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
python -m pip install .
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
import everycode as ec
|
|
20
|
+
|
|
21
|
+
ec.time() # prints the time and also returns it
|
|
22
|
+
ec.year() # prints the current year
|
|
23
|
+
ec.date() # prints YYYY-MM-DD
|
|
24
|
+
ec.datetime() # prints local date and time
|
|
25
|
+
ec.add(4, 5) # prints 9 and returns 9
|
|
26
|
+
ec.celsius_to_fahrenheit(20)
|
|
27
|
+
ec.prank_pun() # prints a harmless joke and returns it
|
|
28
|
+
|
|
29
|
+
ec.help() # categorized list of every command
|
|
30
|
+
ec.help("add") # details about one command
|
|
31
|
+
|
|
32
|
+
ec.sklang() # switch subsequent messages/help to Slovak
|
|
33
|
+
ec.prank_reversed("Ahoj!")
|
|
34
|
+
ec.enlang() # switch back to English
|
|
35
|
+
ec.json_dumps({"name": "Everycode"})
|
|
36
|
+
ec.url_encode("hello world")
|
|
37
|
+
ec.new_id()
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
English is the default language. `ec.sklang()` and `ec.enlang()` change the
|
|
41
|
+
language used by help and localized text helpers for the rest of the program.
|
|
42
|
+
These two language switches are intentionally omitted from `ec.help()`.
|
|
43
|
+
|
|
44
|
+
Commands shown by `ec.help()` print their result automatically and also return
|
|
45
|
+
it, so you can still save it in a variable, for example `answer = ec.add(4, 5)`.
|
|
46
|
+
The helper `ec.commands()` returns a mapping of command names to descriptions.
|
|
47
|
+
The language switches only change the language used by supported text outputs;
|
|
48
|
+
they do not print anything themselves.
|
|
49
|
+
|
|
50
|
+
See [PUBLISHING.md](PUBLISHING.md) for the step-by-step PyPI publishing guide.
|