-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix installed Python command, tests, etc.
- Loading branch information
Showing
9 changed files
with
80 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# `crosshash` | ||
|
||
[![Build status](https://github.com/httpie/crosshash/workflows/test/badge.svg)](https://github.com/httpie/crosshash/actions) | ||
[![PyPi](https://badge.fury.io/py/crosshash.svg)](https://pypi.python.org/pypi/crosshash) | ||
[![NPM](https://badge.fury.io/js/crosshash.svg)](https://www.npmjs.com/package/crosshash) | ||
|
||
https://badge.fury.io/js/crosshash.svg | ||
Stable, cross-platform JSON serialization and hashing for Python and JavaScript. | ||
|
||
## Motivation | ||
|
@@ -10,7 +13,6 @@ To make it possible to compare and hash JSON objects in a stable way across plat | |
|
||
## Installation | ||
|
||
|
||
### Python | ||
|
||
https://pypi.org/project/crosshash | ||
|
@@ -66,7 +68,7 @@ crosshash({'A': MAX_SAFE_INTEGER + 1}) | |
|
||
#### CLI | ||
|
||
You can invoke `crosshash.py` directly or use `python -m crosshash`. The package also installs two identical scripts `crosshash` and `crosshash.py` (the latter is useful when you want to ensure you’re invoking the Python implementation). | ||
You can invoke `crosshash.py` directly or use `python -m crosshash`. The package also installs an executable `crosshash-py`. | ||
|
||
```bash | ||
python3 -m crosshash --json '{"B": 2, "C": [1, 2, 3], "A": 1}' | ||
|
@@ -102,7 +104,7 @@ crosshash({A: Number.MAX_SAFE_INTEGER + 1}) | |
|
||
#### CLI | ||
|
||
You can invoke `crosshash.js` directly. The package also installs two identical scripts `crosshash` and `crosshash.js` (the latter is useful when you want to ensure you’re invoking the JavaScript implementation). | ||
You can invoke `crosshash.js` directly. The package also installs an executable `crosshash-js`. | ||
|
||
```bash | ||
./crosshash.js --json '{"B": 2, "C": [1, 2, 3], "A": 1}' | ||
|
@@ -123,6 +125,8 @@ To ensure consistency, the [test suite](./tests) invokes the Python and JavaScri | |
|
||
## Development | ||
|
||
It should be fairly straightforward to add support for other languages. | ||
|
||
```bash | ||
git clone [email protected]:httpie/crosshash.git | ||
cd ./crosshash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "crosshash" | ||
version = "0.3.1" | ||
version = "0.3.2" | ||
authors = ["Jakub Roztocil <[email protected]>"] | ||
description = "Stable, cross-platform JSON serialization and hashing for Python and JavaScript." | ||
license = "MIT" | ||
|
@@ -11,8 +11,7 @@ packages = [{include = "crosshash.py"}] | |
include = ["LICENSE", "README.md"] | ||
|
||
[tool.poetry.scripts] | ||
crosshash = 'crosshash:main' | ||
'crosshash.py' = 'crosshash:main' | ||
crosshash-py = 'crosshash:main' | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.11" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters