fjson-0.1.6
توضیحات
Python JSON writer with float formatting
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | fjson-0.1.6 |
| نام | fjson |
| نسخه کتابخانه | 0.1.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Nico Schlömer |
| ایمیل نویسنده | nico.schloemer@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/fjson/ |
| مجوز | The MIT License (MIT) opyright (c) 2020-2022 Nico Schlömer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
<p align="center">
<a href="https://github.com/nschloe/fjson"><img alt="fjson" src="https://nschloe.github.io/fjson/logo.svg" width="50%"></a>
<p align="center">JSON with float formatting.</p>
</p>
[](https://pypi.org/project/fjson)
[](https://pypi.org/pypi/fjson/)
[](https://github.com/nschloe/fjson)
[](https://pepy.tech/project/fjson)
<!--[](https://pypistats.org/packages/fjson)-->
[](https://github.com/nschloe/fjson/actions?query=workflow%3Aci)
[](https://codecov.io/gh/nschloe/fjson)
[](https://github.com/psf/black)
The [json](https://docs.python.org/3/library/json.html) module in the Python standard
library does not allow you to specify the format in which `float`s are written out the
file. This module adds the `float_format` parameter.
```python
import math
import fjson
data = {"a": 1, "b": math.pi}
string = fjson.dumps(data, float_format=".6e", indent=2, separators=(", ", ": "))
print(string)
```
<!--pytest-codeblocks:expected-output-->
```json
{
"a": 1,
"b": 3.141593e+00
}
```
### License
fjson is published under the [MIT license](https://en.wikipedia.org/wiki/MIT_License).
نحوه نصب
نصب پکیج whl fjson-0.1.6:
pip install fjson-0.1.6.whl
نصب پکیج tar.gz fjson-0.1.6:
pip install fjson-0.1.6.tar.gz