cjvalpy-0.3.2
توضیحات
The Python bindings of the official CityJSON validator
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cjvalpy-0.3.2 |
| نام | cjvalpy |
| نسخه کتابخانه | 0.3.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Hugo Ledoux <h.ledoux@tudelft.nl> |
| ایمیل نویسنده | Hugo Ledoux <h.ledoux@tudelft.nl> |
| آدرس صفحه اصلی | https://github.com/hugoledoux/cjvalpy |
| آدرس اینترنتی | https://pypi.org/project/cjvalpy/ |
| مجوز | MIT |
# cjvalpy
[](https://github.com/cityjson/cjvalpy/blob/main/LICENSE)
[](https://badge.fury.io/py/cjvalpy)
Python bindings of [cjval](https://github.com/cityjson/cjval), the official validator for [CityJSON](https://cityjson.org) files.
## Installation
### pip
To install the latest release: `pip install cjvalpy`
### Development
1. install [Rust](https://www.rust-lang.org/) (v1.39+)
2. install [maturin](https://github.com/PyO3/maturin)
3. `maturin develop`
4. move to another folder, and `import cjvalpy` shouldn't return any error
## Usage
Made to be used with [cjio](https://github.com/cityjson/cjio):
```bash
cjio myfile.city.json validate
```
but can be used directly in python:
```python
import cjvalpy
import json
f = open("/home/elvis/mydata/myfile.city.json")
fj = f.read()
val = cjvalpy.CJValidator([fj])
re = val.validate()
if re == True:
print("✅")
else:
print("oh no invalid 😢")
print(val.get_report())
```
نیازمندی
| مقدار | نام |
|---|---|
| - | toml==0.10.2 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl cjvalpy-0.3.2:
pip install cjvalpy-0.3.2.whl
نصب پکیج tar.gz cjvalpy-0.3.2:
pip install cjvalpy-0.3.2.tar.gz