Name | polyvalid JSON |
Version |
0.1.5
JSON |
| download |
home_page | |
Summary | A validator for package names, namespace, username and app name on wasmer |
upload_time | 2023-03-26 17:22:27 |
maintainer | |
docs_url | None |
author | |
requires_python | |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# polyvalid
`polyvalid` is a Rust library for validating package names, usernames, namespace names, and app names. The library provides a single source of truth for validating the names with the following rules:
1. Start with an alphabet character
2. Have one or more alphanumeric characters, `_` or `-`
3. End with an alphanumeric character
Additionally, the library checks if the name contains `--` since it can break URL rules.
The library can be used from Python and JS through the provided bindings.
## Using the library
The library can be used from rust, python or javascript. The following describes how to use it from all three languages.
### Rust
```bash
cargo add polyvalid
```
```rust
use polyvalid;
let name: String = "polyvalid";
assert!(polyvalid::is_name_valid(name));
```
### Python
```bash
pip add polyvalid
```
```python
import polyvalid
name = "polyvalid"
polyvalid.is_name_valid(name) # returns True
```
### Javascript
```bash
npm i polyvalid
```
```js
import "polyvalid";
name = "polyvalid";
polyvalid.is_valid_name(name); // returns true
```
## Next steps
- [ ] Add CI to autopublish to wapm, pypi, npm
- [ ] Add tests for python and JS versions of the library
- [ ] Add wrapper around the python library (to improve usability)
## Contributing
Contributions are welcome! If you'd like to contribute to `polyvalid`, please follow these steps:
1. Fork the repo and create a new branch for your changes.
2. Make your changes, write tests, and ensure that the tests pass.
3. Submit a pull request to the `polyvalid` repo.
4. Wait for feedback or approval from the maintainers.
Raw data
{
"_id": null,
"home_page": "",
"name": "polyvalid",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/4f/99/1c14338c5310355563559754b4df7c7f5dd47ae11f68d0b4cea52cc09ace/polyvalid-0.1.5.tar.gz",
"platform": null,
"description": "# polyvalid\n\n`polyvalid` is a Rust library for validating package names, usernames, namespace names, and app names. The library provides a single source of truth for validating the names with the following rules:\n\n1. Start with an alphabet character\n2. Have one or more alphanumeric characters, `_` or `-`\n3. End with an alphanumeric character\n\nAdditionally, the library checks if the name contains `--` since it can break URL rules.\n\nThe library can be used from Python and JS through the provided bindings.\n\n\n## Using the library\nThe library can be used from rust, python or javascript. The following describes how to use it from all three languages.\n\n### Rust\n\n```bash\ncargo add polyvalid\n```\n\n```rust\nuse polyvalid;\n\nlet name: String = \"polyvalid\";\n\nassert!(polyvalid::is_name_valid(name));\n```\n\n### Python\n\n\n```bash\npip add polyvalid\n```\n\n```python\nimport polyvalid\n\nname = \"polyvalid\"\npolyvalid.is_name_valid(name) # returns True\n```\n\n\n### Javascript\n\n```bash\nnpm i polyvalid\n```\n\n```js\nimport \"polyvalid\";\nname = \"polyvalid\";\npolyvalid.is_valid_name(name); // returns true\n```\n\n\n## Next steps\n\n- [ ] Add CI to autopublish to wapm, pypi, npm\n- [ ] Add tests for python and JS versions of the library\n- [ ] Add wrapper around the python library (to improve usability)\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute to `polyvalid`, please follow these steps:\n\n1. Fork the repo and create a new branch for your changes.\n2. Make your changes, write tests, and ensure that the tests pass.\n3. Submit a pull request to the `polyvalid` repo.\n4. Wait for feedback or approval from the maintainers.\n",
"bugtrack_url": null,
"license": "",
"summary": "A validator for package names, namespace, username and app name on wasmer",
"version": "0.1.5",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c871755de0abd1370e644e3fd86ff3177fb5f0b691d8e6e426739c0e38505e31",
"md5": "5f862c32e72087dd5a496e9a32d33b03",
"sha256": "436968f9d7c621fd90572743ea3dbba821a10e77ee79a2b3f9b5777e9d1e9173"
},
"downloads": -1,
"filename": "polyvalid-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5f862c32e72087dd5a496e9a32d33b03",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 688277,
"upload_time": "2023-03-26T17:22:25",
"upload_time_iso_8601": "2023-03-26T17:22:25.893382Z",
"url": "https://files.pythonhosted.org/packages/c8/71/755de0abd1370e644e3fd86ff3177fb5f0b691d8e6e426739c0e38505e31/polyvalid-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4f991c14338c5310355563559754b4df7c7f5dd47ae11f68d0b4cea52cc09ace",
"md5": "a3a6b6ae7b4461a5ce270c64dffc9016",
"sha256": "e508d867f8abbecdd1ba0d5256ddb791eb9a0cb9dd63f069c058ed1b7ee5fc67"
},
"downloads": -1,
"filename": "polyvalid-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "a3a6b6ae7b4461a5ce270c64dffc9016",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 681126,
"upload_time": "2023-03-26T17:22:27",
"upload_time_iso_8601": "2023-03-26T17:22:27.771389Z",
"url": "https://files.pythonhosted.org/packages/4f/99/1c14338c5310355563559754b4df7c7f5dd47ae11f68d0b4cea52cc09ace/polyvalid-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-26 17:22:27",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "polyvalid"
}