chbshash 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.
Files changed (39) hide show
  1. chbshash-0.1.0/.dprint.jsonc +35 -0
  2. chbshash-0.1.0/.gitattributes +4 -0
  3. chbshash-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +2 -0
  4. chbshash-0.1.0/.github/workflows/docs.yml +38 -0
  5. chbshash-0.1.0/.github/workflows/lint.yml +22 -0
  6. chbshash-0.1.0/.github/workflows/pytest.yml +66 -0
  7. chbshash-0.1.0/.github/workflows/wheels.yml +55 -0
  8. chbshash-0.1.0/.gitignore +67 -0
  9. chbshash-0.1.0/.readthedocs.yaml +20 -0
  10. chbshash-0.1.0/HOW_TO_RELEASE +62 -0
  11. chbshash-0.1.0/LICENSE +191 -0
  12. chbshash-0.1.0/LICENSE.english-words.md +24 -0
  13. chbshash-0.1.0/MANIFEST.in +11 -0
  14. chbshash-0.1.0/PKG-INFO +30 -0
  15. chbshash-0.1.0/README.md +11 -0
  16. chbshash-0.1.0/chbshash/__init__.py +13 -0
  17. chbshash-0.1.0/chbshash/api.py +77 -0
  18. chbshash-0.1.0/chbshash/cli.py +204 -0
  19. chbshash-0.1.0/chbshash/py.typed +0 -0
  20. chbshash-0.1.0/chbshash/tests/__init__.py +0 -0
  21. chbshash-0.1.0/chbshash/tests/test_cli.py +327 -0
  22. chbshash-0.1.0/chbshash/tests/test_correcthorse.py +58 -0
  23. chbshash-0.1.0/chbshash/words_alpha.json.gz +0 -0
  24. chbshash-0.1.0/doc/_static/.gitignore +5 -0
  25. chbshash-0.1.0/doc/_static/password_strength_2x.png +0 -0
  26. chbshash-0.1.0/doc/_static/style.css +18 -0
  27. chbshash-0.1.0/doc/_templates/layout.html +1 -0
  28. chbshash-0.1.0/doc/api.rst +7 -0
  29. chbshash-0.1.0/doc/cli.rst +83 -0
  30. chbshash-0.1.0/doc/conf.py +300 -0
  31. chbshash-0.1.0/doc/develop.rst +105 -0
  32. chbshash-0.1.0/doc/index.rst +77 -0
  33. chbshash-0.1.0/doc/installing.rst +23 -0
  34. chbshash-0.1.0/doc/requirements.yml +12 -0
  35. chbshash-0.1.0/doc/whats-new.rst +9 -0
  36. chbshash-0.1.0/lefthook.yml +21 -0
  37. chbshash-0.1.0/pixi.lock +5572 -0
  38. chbshash-0.1.0/pyproject.toml +211 -0
  39. chbshash-0.1.0/smoke_test.py +14 -0
@@ -0,0 +1,35 @@
1
+ {
2
+ "json": {
3
+ "lineWidth": 88,
4
+ "array.preferSingleLine": true,
5
+ },
6
+ "markdown": {
7
+ "lineWidth": 88,
8
+ "emphasisKind": "asterisks",
9
+ },
10
+ "markup": {
11
+ "printWidth": 88,
12
+ },
13
+ "toml": {
14
+ "lineWidth": 88,
15
+ },
16
+ "yaml": {
17
+ "printWidth": 88,
18
+ "formatComments": true,
19
+ "braceSpacing": false,
20
+ },
21
+ "excludes": [
22
+ "**/*-lock.json",
23
+ "**/*.lock",
24
+ "**/node_modules/",
25
+ "dist/",
26
+ "doc/requirements.yml",
27
+ ],
28
+ "plugins": [
29
+ "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
30
+ "https://plugins.dprint.dev/json-0.20.0.wasm",
31
+ "https://plugins.dprint.dev/markdown-0.19.0.wasm",
32
+ "https://plugins.dprint.dev/toml-0.7.0.wasm",
33
+ "https://plugins.dprint.dev/g-plane/markup_fmt-v0.22.0.wasm",
34
+ ],
35
+ }
@@ -0,0 +1,4 @@
1
+ # SCM syntax highlighting & preventing 3-way merges
2
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true
3
+ # reduce the number of merge conflicts
4
+ doc/whats-new.rst merge=union
@@ -0,0 +1,2 @@
1
+ - [ ] Closes #xxxx
2
+ - [ ] Tests added / passed
@@ -0,0 +1,38 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+
9
+ defaults:
10
+ run:
11
+ shell: bash -l {0}
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v6
19
+
20
+ - uses: prefix-dev/setup-pixi@v0
21
+ with:
22
+ pixi-version: v0.66.0
23
+ cache: true
24
+ environments: docs
25
+
26
+ - name: Regenerate readthedocs environment
27
+ run: pixi run doc-requirements
28
+
29
+ - name: Check that readthedocs environment is up to date in git
30
+ run: git diff --exit-code doc/requirements.yml
31
+
32
+ - name: Build docs
33
+ run: pixi run -e docs docs
34
+
35
+ - uses: actions/upload-artifact@v7
36
+ with:
37
+ name: chbshash-docs
38
+ path: build/html
@@ -0,0 +1,22 @@
1
+ name: Linting
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+
9
+ jobs:
10
+ checks:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v6
14
+ - uses: prefix-dev/setup-pixi@v0
15
+ with:
16
+ pixi-version: v0.66.0
17
+ cache: true
18
+ environments: lint
19
+ - name: Run linters
20
+ run: pixi run lint
21
+ - name: Check for changed files after linting
22
+ run: git diff --exit-code
@@ -0,0 +1,66 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+ workflow_dispatch: # allows you to trigger manually
9
+
10
+ # When this workflow is queued, automatically cancel any previous running
11
+ # or pending jobs from the same branch
12
+ concurrency:
13
+ group: pytest-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ defaults:
17
+ run:
18
+ shell: bash -l {0}
19
+
20
+ jobs:
21
+ test:
22
+ name: ${{ matrix.os }} ${{ matrix.environment }}
23
+ runs-on: ${{ matrix.os }}
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ # Note: this project relies on random.Random() to produce stable outputs across
28
+ # platforms and Python versions. The test suite verifies this; this is why the
29
+ # matrix is so thorough. Also, hhash and chbssum feature OS-specific newline
30
+ # handling.
31
+ os:
32
+ - ubuntu-latest # x86-64
33
+ - ubuntu-24.04-arm # ARM
34
+ - macos-15-intel # x86-64
35
+ - macos-latest # ARM
36
+ - windows-latest # x86-64
37
+ environment: [smoke, mindeps, py314]
38
+ include:
39
+ - os: ubuntu-latest
40
+ environment: nogil
41
+
42
+ steps:
43
+ - name: Checkout
44
+ uses: actions/checkout@v6
45
+
46
+ - uses: prefix-dev/setup-pixi@v0
47
+ with:
48
+ pixi-version: v0.66.0
49
+ environments: ${{ matrix.environment }}
50
+ cache: true
51
+ locked: true
52
+
53
+ - name: Smoke test
54
+ run: pixi run -e ${{ matrix.environment }} smoke-test
55
+
56
+ - name: pytest with coverage
57
+ if: matrix.environment != 'smoke'
58
+ run: pixi run -e ${{ matrix.environment }} coverage
59
+
60
+ - name: Free-threading stress test
61
+ if: matrix.environment == 'nogil'
62
+ run: pixi run -e nogil tests --parallel-threads=4
63
+
64
+ - name: codecov.io
65
+ if: matrix.environment != 'smoke'
66
+ uses: codecov/codecov-action@v5
@@ -0,0 +1,55 @@
1
+ name: Wheels
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+
9
+ defaults:
10
+ run:
11
+ shell: bash -l {0}
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v6
19
+ with:
20
+ fetch-depth: 0 # Fetch full git history for hatch-vcs
21
+ fetch-tags: true # Fetch tags for hatch-vcs
22
+
23
+ - uses: prefix-dev/setup-pixi@v0
24
+ with:
25
+ pixi-version: v0.66.0
26
+ cache: true
27
+ environments: dist
28
+
29
+ - name: Build sdist and wheels
30
+ run: pixi run dist
31
+
32
+ - name: Set up Python
33
+ uses: actions/setup-python@v6
34
+ with:
35
+ python-version: "3.14"
36
+
37
+ - name: Install wheel
38
+ run: pip install dist/*.whl
39
+
40
+ - name: Smoke test
41
+ working-directory: /tmp
42
+ run: |
43
+ cp ${{ github.workspace }}/smoke_test.py .
44
+ python smoke_test.py
45
+
46
+ - name: CLI smoke test (chbs)
47
+ run: chbs
48
+ - name: CLI smoke test (chbssum)
49
+ run: echo "hello world" | chbssum
50
+
51
+ - uses: actions/upload-artifact@v7
52
+ with:
53
+ name: dist
54
+ path: dist/*
55
+ if-no-files-found: error
@@ -0,0 +1,67 @@
1
+ # pixi environments
2
+ .pixi/*
3
+ !.pixi/config.toml
4
+
5
+ *.pyc
6
+ __pycache__
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Packages
12
+ *.egg
13
+ *.egg-info
14
+ .eggs
15
+ dist
16
+ build
17
+ eggs
18
+ parts
19
+ var
20
+ sdist
21
+ develop-eggs
22
+ .installed.cfg
23
+ lib
24
+ lib64
25
+
26
+ # Installer logs
27
+ pip-log.txt
28
+
29
+ # Unit test / coverage reports
30
+ .coverage*
31
+ coverage.xml
32
+ .tox
33
+ nosetests.xml
34
+ .cache
35
+ .mypy_cache/
36
+ .ropeproject/
37
+ .tags*
38
+ .testmon*
39
+ .pytest_cache
40
+ dask-worker-space/
41
+
42
+ # asv environments
43
+ .asv
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # IDEs
54
+ .idea
55
+ *.swp
56
+ .DS_Store
57
+ .vscode/
58
+
59
+ # Sync tools
60
+ Icon*
61
+
62
+ .ipynb_checkpoints
63
+
64
+ doc/_build
65
+ Untitled.ipynb
66
+ htmlcov/
67
+ .~lock.*
@@ -0,0 +1,20 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: mambaforge-22.9
7
+
8
+ conda:
9
+ environment: doc/requirements.yml
10
+
11
+ python:
12
+ install:
13
+ - method: pip
14
+ path: .
15
+
16
+ sphinx:
17
+ builder: html
18
+ configuration: doc/conf.py
19
+ # This is deliberately laxer than the setting in CI
20
+ fail_on_warning: false
@@ -0,0 +1,62 @@
1
+ How to issue a release in 15 easy steps
2
+
3
+ Time required: about an hour.
4
+
5
+ 1. Ensure your main branch is synced to origin:
6
+ git pull origin main
7
+ 2. Look over whats-new.rst and the docs. Make sure "What's New" is complete
8
+ (check the date!) and add a brief summary note describing the release at the
9
+ top.
10
+ 3. If you have any doubts, run the full test suite one final time!
11
+ pixi run tests
12
+ 4. On the main branch, commit the release in git:
13
+ git commit -a -m 'Release vX.Y.Z'
14
+ 5. Tag the release:
15
+ git tag -a vX.Y.Z -m 'vX.Y.Z'
16
+ 6. Push your changes to main:
17
+ git push origin main
18
+ git push origin --tags
19
+ 7. Update the stable branch (used by ReadTheDocs) and switch back to main:
20
+ git checkout stable
21
+ git rebase main
22
+ git push origin stable
23
+ git checkout main
24
+ It's OK to force push to 'stable' if necessary.
25
+ We also update the stable branch with `git cherrypick` for documentation
26
+ only fixes that apply the current released version.
27
+ 8. Build and test the release package
28
+ pixi run dist
29
+ 9. Add a section for the next release to doc/whats-new.rst.
30
+ 10. Commit your changes and push to main again:
31
+ git commit -a -m 'Revert to dev version'
32
+ git push origin main
33
+ You're done pushing to main!
34
+ 11. Issue the release on GitHub. Open https://github.com/crusaderky/chbshash/releases;
35
+ the new release should have automatically appeared. Otherwise, click on
36
+ "Draft a new release" and paste in the latest from whats-new.rst.
37
+ 12. Use twine to register and upload the release on pypi. Be careful, you can't
38
+ take this back!
39
+ pixi run twine-upload
40
+ You will need to be listed as a package owner at
41
+ https://pypi.python.org/pypi/chbshash for this to work.
42
+ 13. Update the docs. Login to https://readthedocs.org/projects/chbshash/versions/
43
+ and switch your new release tag (at the bottom) from "Inactive" to "Active".
44
+ It should now build automatically.
45
+ Make sure that both the new tagged version and 'stable' build successfully.
46
+ 14. Update conda-forge.
47
+ 14a. Clone https://github.com/conda-forge/chbshash-feedstock
48
+ 14b. Update the version number and sha256 in meta.yaml.
49
+ You can calculate sha256 with
50
+ sha256sum dist/*
51
+ 14c. Double check dependencies in meta.yaml and update them to match pyproject.toml.
52
+ 14d. Submit a pull request.
53
+ 14e. Write a comment in the PR:
54
+ @conda-forge-admin, please rerender
55
+ Wait for the rerender commit (it may take a few minutes).
56
+ 14f. Wait for CI to pass and merge.
57
+ 14g. The next day, test the conda-forge release
58
+ conda search chbshash
59
+ conda create -n chbshash-test chbshash
60
+ conda activate chbshash-test
61
+ conda list
62
+ python -c 'import chbshash'
chbshash-0.1.0/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form, made
34
+ available under the License, as indicated by a copyright notice that is included
35
+ in or attached to the work (an example is provided in the Appendix below).
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original version
45
+ of the Work and any modifications or additions to that Work or Derivative Works
46
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
47
+ by the copyright owner or by an individual or Legal Entity authorized to submit
48
+ on behalf of the copyright owner. For the purposes of this definition,
49
+ "submitted" means any form of electronic, verbal, or written communication sent
50
+ to the Licensor or its representatives, including but not limited to
51
+ communication on electronic mailing lists, source code control systems, and
52
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
53
+ the purpose of discussing and improving the Work, but excluding communication
54
+ that is conspicuously marked or otherwise designated in writing by the copyright
55
+ owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License.
62
+
63
+ Subject to the terms and conditions of this License, each Contributor hereby
64
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
65
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
66
+ publicly display, publicly perform, sublicense, and distribute the Work and such
67
+ Derivative Works in Source or Object form.
68
+
69
+ 3. Grant of Patent License.
70
+
71
+ Subject to the terms and conditions of this License, each Contributor hereby
72
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
73
+ irrevocable (except as stated in this section) patent license to make, have
74
+ made, use, offer to sell, sell, import, and otherwise transfer the Work, where
75
+ such license applies only to those patent claims licensable by such Contributor
76
+ that are necessarily infringed by their Contribution(s) alone or by combination
77
+ of their Contribution(s) with the Work to which such Contribution(s) was
78
+ submitted. If You institute patent litigation against any entity (including a
79
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
80
+ Contribution incorporated within the Work constitutes direct or contributory
81
+ patent infringement, then any patent licenses granted to You under this License
82
+ for that Work shall terminate as of the date such litigation is filed.
83
+
84
+ 4. Redistribution.
85
+
86
+ You may reproduce and distribute copies of the Work or Derivative Works thereof
87
+ in any medium, with or without modifications, and in Source or Object form,
88
+ provided that You meet the following conditions:
89
+
90
+ You must give any other recipients of the Work or Derivative Works a copy of
91
+ this License; and
92
+ You must cause any modified files to carry prominent notices stating that You
93
+ changed the files; and
94
+ You must retain, in the Source form of any Derivative Works that You distribute,
95
+ all copyright, patent, trademark, and attribution notices from the Source form
96
+ of the Work, excluding those notices that do not pertain to any part of the
97
+ Derivative Works; and
98
+ If the Work includes a "NOTICE" text file as part of its distribution, then any
99
+ Derivative Works that You distribute must include a readable copy of the
100
+ attribution notices contained within such NOTICE file, excluding those notices
101
+ that do not pertain to any part of the Derivative Works, in at least one of the
102
+ following places: within a NOTICE text file distributed as part of the
103
+ Derivative Works; within the Source form or documentation, if provided along
104
+ with the Derivative Works; or, within a display generated by the Derivative
105
+ Works, if and wherever such third-party notices normally appear. The contents of
106
+ the NOTICE file are for informational purposes only and do not modify the
107
+ License. You may add Your own attribution notices within Derivative Works that
108
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
109
+ provided that such additional attribution notices cannot be construed as
110
+ modifying the License.
111
+ You may add Your own copyright statement to Your modifications and may provide
112
+ additional or different license terms and conditions for use, reproduction, or
113
+ distribution of Your modifications, or for any such Derivative Works as a whole,
114
+ provided Your use, reproduction, and distribution of the Work otherwise complies
115
+ with the conditions stated in this License.
116
+
117
+ 5. Submission of Contributions.
118
+
119
+ Unless You explicitly state otherwise, any Contribution intentionally submitted
120
+ for inclusion in the Work by You to the Licensor shall be under the terms and
121
+ conditions of this License, without any additional terms or conditions.
122
+ Notwithstanding the above, nothing herein shall supersede or modify the terms of
123
+ any separate license agreement you may have executed with Licensor regarding
124
+ such Contributions.
125
+
126
+ 6. Trademarks.
127
+
128
+ This License does not grant permission to use the trade names, trademarks,
129
+ service marks, or product names of the Licensor, except as required for
130
+ reasonable and customary use in describing the origin of the Work and
131
+ reproducing the content of the NOTICE file.
132
+
133
+ 7. Disclaimer of Warranty.
134
+
135
+ Unless required by applicable law or agreed to in writing, Licensor provides the
136
+ Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
137
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
138
+ including, without limitation, any warranties or conditions of TITLE,
139
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
140
+ solely responsible for determining the appropriateness of using or
141
+ redistributing the Work and assume any risks associated with Your exercise of
142
+ permissions under this License.
143
+
144
+ 8. Limitation of Liability.
145
+
146
+ In no event and under no legal theory, whether in tort (including negligence),
147
+ contract, or otherwise, unless required by applicable law (such as deliberate
148
+ and grossly negligent acts) or agreed to in writing, shall any Contributor be
149
+ liable to You for damages, including any direct, indirect, special, incidental,
150
+ or consequential damages of any character arising as a result of this License or
151
+ out of the use or inability to use the Work (including but not limited to
152
+ damages for loss of goodwill, work stoppage, computer failure or malfunction, or
153
+ any and all other commercial damages or losses), even if such Contributor has
154
+ been advised of the possibility of such damages.
155
+
156
+ 9. Accepting Warranty or Additional Liability.
157
+
158
+ While redistributing the Work or Derivative Works thereof, You may choose to
159
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
160
+ other liability obligations and/or rights consistent with this License. However,
161
+ in accepting such obligations, You may act only on Your own behalf and on Your
162
+ sole responsibility, not on behalf of any other Contributor, and only if You
163
+ agree to indemnify, defend, and hold each Contributor harmless for any liability
164
+ incurred by, or claims asserted against, such Contributor by reason of your
165
+ accepting any such warranty or additional liability.
166
+
167
+ END OF TERMS AND CONDITIONS
168
+
169
+ APPENDIX: How to apply the Apache License to your work
170
+
171
+ To apply the Apache License to your work, attach the following boilerplate
172
+ notice, with the fields enclosed by brackets "[]" replaced with your own
173
+ identifying information. (Don't include the brackets!) The text should be
174
+ enclosed in the appropriate comment syntax for the file format. We also
175
+ recommend that a file or class name and description of purpose be included on
176
+ the same "printed page" as the copyright notice for easier identification within
177
+ third-party archives.
178
+
179
+ Copyright [yyyy] [name of copyright owner]
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org/>
@@ -0,0 +1,11 @@
1
+ include HOW_TO_RELEASE
2
+ include LICENSE
3
+ include *.md
4
+ include *.py
5
+ recursive-include doc *
6
+ recursive-include chbshash *
7
+ prune doc/_build
8
+ global-exclude __pycache__
9
+ global-exclude *.pyc
10
+ global-exclude .DS_Store
11
+ global-exclude .ipynb_checkpoints
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: chbshash
3
+ Version: 0.1.0
4
+ Summary: XKCD's Correct Horse Battery Staple passphrase generator and hasher
5
+ Project-URL: homepage, https://github.com/crusaderky/chbshash
6
+ Project-URL: issues, https://github.com/crusaderky/chbshash/issues
7
+ Project-URL: documentation, https://chbshash.readthedocs.io/
8
+ Project-URL: changelog, https://chbshash.readthedocs.io/en/latest/whats-new.html
9
+ Author-email: crusaderky <crusaderky@gmail.com>
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: LICENSE.english-words.md
13
+ Keywords: hash,password,xkcd
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: Free Threading :: 4 - Resilient
26
+ Classifier: Topic :: Security :: Cryptography
27
+ Requires-Python: >=3.9
28
+ Description-Content-Type: text/plain
29
+
30
+ XKCD's Correct Horse Battery Staple passphrase generator and hasher
@@ -0,0 +1,11 @@
1
+ [![doc-badge](https://github.com/crusaderky/chbshash/actions/workflows/docs.yml/badge.svg)](https://github.com/crusaderky/chbshash/actions)
2
+ [![lint-badge](https://github.com/crusaderky/chbshash/actions/workflows/lint.yml/badge.svg)](https://github.com/crusaderky/chbshash/actions)
3
+ [![wheels-badge](https://github.com/crusaderky/chbshash/actions/workflows/wheels.yml/badge.svg)](https://github.com/crusaderky/chbshash/actions)
4
+ [![pytest-badge](https://github.com/crusaderky/chbshash/actions/workflows/pytest.yml/badge.svg)](https://github.com/crusaderky/chbshash/actions)
5
+ [![codecov-badge](https://codecov.io/gh/crusaderky/chbshash/branch/main/graph/badge.svg)](https://codecov.io/gh/crusaderky/chbshash/branch/main)
6
+
7
+ # chbshash
8
+
9
+ XKCD's *Correct Horse Battery Staple* passphrase generator and hasher
10
+
11
+ Full documentation at http://chbshash.readthedocs.io/
@@ -0,0 +1,13 @@
1
+ import importlib.metadata
2
+
3
+ # Import implementation modules
4
+ from chbshash.api import clear_cache, hash, random, words
5
+
6
+ try:
7
+ __version__ = importlib.metadata.version("chbshash")
8
+ except importlib.metadata.PackageNotFoundError: # pragma: nocover
9
+ # Local copy, not installed with pip
10
+ __version__ = "9999"
11
+
12
+
13
+ __all__ = ("__version__", "clear_cache", "hash", "random", "words")