dextercipher 0.1.0__py3-none-any.whl
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.
dextercipher/__init__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""A simple text cipher."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def cipher(word: object) -> str:
|
|
5
|
+
"""Reverse the characters in each half of the input text."""
|
|
6
|
+
text = str(word)
|
|
7
|
+
middle = len(text) // 2
|
|
8
|
+
first_half = text[:middle]
|
|
9
|
+
second_half = text[middle:] if len(text) % 2 == 0 else text[middle + 1 :]
|
|
10
|
+
return first_half[::-1] + second_half[::-1]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dextercipher
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple text cipher
|
|
5
|
+
Requires-Python: >=3.8
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
|
|
8
|
+
# DexterCipher
|
|
9
|
+
|
|
10
|
+
DexterCipher is a simple Python package that transforms text by reversing the
|
|
11
|
+
characters in each half of a string.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python -m pip install dextercipher
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from dextercipher import cipher
|
|
23
|
+
|
|
24
|
+
encrypted_text = cipher("HelloWorld")
|
|
25
|
+
print(encrypted_text)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Build and publish
|
|
29
|
+
|
|
30
|
+
Install the build and upload tools:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
python -m pip install --upgrade build twine
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Build the package and check the distributions:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
python -m build
|
|
40
|
+
python -m twine check dist/*
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Upload to TestPyPI first:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
python -m twine upload --repository testpypi dist/*
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
After verifying the TestPyPI package, upload to PyPI:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m twine upload dist/*
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Twine will prompt for credentials. Use a PyPI API token; do not put it in this
|
|
56
|
+
project's source code.
|
|
57
|
+
|
|
58
|
+
## Security note
|
|
59
|
+
|
|
60
|
+
This package is a simple text transformation, not secure encryption. Do not
|
|
61
|
+
use it to protect sensitive information.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
dextercipher/__init__.py,sha256=qEhB03YeTmP_CLiccKlV9yoD1Sut8p0SNBfnb5QFJHs,344
|
|
2
|
+
dextercipher-0.1.0.dist-info/METADATA,sha256=w6IvSeZqJRvLGAVd9y40DAubDaTtdoL1dyO2tbZCrDk,1176
|
|
3
|
+
dextercipher-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
4
|
+
dextercipher-0.1.0.dist-info/top_level.txt,sha256=m_5eLI_DQe7xs95i-S6djbpa3fvwpA2N6UPOTnWZIxU,13
|
|
5
|
+
dextercipher-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dextercipher
|