Name | si-prefix JSON |
Version |
1.3.3
JSON |
| download |
home_page | None |
Summary | Functions for formatting numbers according to SI standards. |
upload_time | 2024-07-05 05:37:24 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | BSD-3 |
keywords |
si
prefix
format
number
precision
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# si_prefix #
[![codecov](https://codecov.io/github/cfobel/si-prefix/graph/badge.svg?token=HhZzqDEB92)](https://codecov.io/github/cfobel/si-prefix)
Functions for formatting numbers according to SI standards.
Example usage:
from si_prefix import si_format
print si_format(.5)
# 500.0 m (default precision is 1)
print si_format(.01331, precision=2)
# 13.31 m
print si_format(1331, precision=2)
# 1.33 k
print si_format(1331, precision=0)
# 1 k
# Changelog #
- **1.0:** use unicode strings and use µ (i.e., ``\N{MICRO SIGN}``) to denote
micro (not u).
- **Note: switching to unicode strings is an API-breaking change and may
break code expecting a `str` return type.**
- See [issue #4][i4] for more details.
- **0.5:** change license to 3-clause BSD
- **0.4.1:** add space before unit prefix
- **0.4:** add Python 3 support, `si_parse` function
- **0.2:** bug fixes
- **0.1:** initial release
# Credits #
Written by Christian Fobel <christian@fobel.net>
Ported from [C version][1] written by Jukka “Yucca” Korpela
<jkorpela@cs.tut.fi>.
## Contributors ##
Python 3 support: [olehermanse][2]
License
-------
This project is licensed under the terms of the [BSD 3-clause license](/LICENSE.md)
[1]: http://www.cs.tut.fi/~jkorpela/c/eng.html
[2]: https://github.com/olehermanse
[i4]: https://github.com/cfobel/si-prefix/issues/4
Raw data
{
"_id": null,
"home_page": null,
"name": "si-prefix",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "si, prefix, format, number, precision",
"author": null,
"author_email": "Christian Fobel <christian@fobel.net>",
"download_url": "https://files.pythonhosted.org/packages/b7/a4/1857f675a120e5b9a1b88534664b6f33b6513f8233cd55e410249441c7a3/si_prefix-1.3.3.tar.gz",
"platform": null,
"description": "# si_prefix #\n\n[![codecov](https://codecov.io/github/cfobel/si-prefix/graph/badge.svg?token=HhZzqDEB92)](https://codecov.io/github/cfobel/si-prefix)\n\nFunctions for formatting numbers according to SI standards.\n\nExample usage:\n\n from si_prefix import si_format\n\n print si_format(.5)\n # 500.0 m (default precision is 1)\n\n print si_format(.01331, precision=2)\n # 13.31 m\n\n print si_format(1331, precision=2)\n # 1.33 k\n\n print si_format(1331, precision=0)\n # 1 k\n\n# Changelog #\n\n - **1.0:** use unicode strings and use \u00b5 (i.e., ``\\N{MICRO SIGN}``) to denote\n micro (not u).\n - **Note: switching to unicode strings is an API-breaking change and may\n break code expecting a `str` return type.**\n - See [issue #4][i4] for more details.\n - **0.5:** change license to 3-clause BSD\n - **0.4.1:** add space before unit prefix\n - **0.4:** add Python 3 support, `si_parse` function\n - **0.2:** bug fixes\n - **0.1:** initial release\n\n# Credits #\n\nWritten by Christian Fobel <christian@fobel.net> \n\nPorted from [C version][1] written by Jukka \u201cYucca\u201d Korpela\n<jkorpela@cs.tut.fi>.\n\n## Contributors ##\n\nPython 3 support: [olehermanse][2]\n\nLicense\n-------\nThis project is licensed under the terms of the [BSD 3-clause license](/LICENSE.md)\n\n[1]: http://www.cs.tut.fi/~jkorpela/c/eng.html\n[2]: https://github.com/olehermanse\n[i4]: https://github.com/cfobel/si-prefix/issues/4\n",
"bugtrack_url": null,
"license": "BSD-3",
"summary": "Functions for formatting numbers according to SI standards.",
"version": "1.3.3",
"project_urls": {
"homepage": "https://github.com/cfobel/si-prefix"
},
"split_keywords": [
"si",
" prefix",
" format",
" number",
" precision"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ae0bbb1f24a3b168d311278718134844d28e5bbf9a3786d9eac3550f9ff1f14d",
"md5": "4b51df9bd21f0569caa37ecb9eca9007",
"sha256": "c665c38a43d69eeed3e27ee4b1d301225f202024eb2577df9879fe1f272164c6"
},
"downloads": -1,
"filename": "si_prefix-1.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4b51df9bd21f0569caa37ecb9eca9007",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6394,
"upload_time": "2024-07-05T05:37:22",
"upload_time_iso_8601": "2024-07-05T05:37:22.938374Z",
"url": "https://files.pythonhosted.org/packages/ae/0b/bb1f24a3b168d311278718134844d28e5bbf9a3786d9eac3550f9ff1f14d/si_prefix-1.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b7a41857f675a120e5b9a1b88534664b6f33b6513f8233cd55e410249441c7a3",
"md5": "49d4f3402e7c7f56988ac120b372ee94",
"sha256": "e0ee62c6aefea83d502509d6bb7047c344c38418816406046cb6588f84f44152"
},
"downloads": -1,
"filename": "si_prefix-1.3.3.tar.gz",
"has_sig": false,
"md5_digest": "49d4f3402e7c7f56988ac120b372ee94",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20436,
"upload_time": "2024-07-05T05:37:24",
"upload_time_iso_8601": "2024-07-05T05:37:24.366019Z",
"url": "https://files.pythonhosted.org/packages/b7/a4/1857f675a120e5b9a1b88534664b6f33b6513f8233cd55e410249441c7a3/si_prefix-1.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-05 05:37:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cfobel",
"github_project": "si-prefix",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "si-prefix"
}