Skip to main content

cjvalpy

GitHub license PyPI version

Python bindings of cjval, the official validator for CityJSON files.

Installation

pip

To install the latest release: pip install cjvalpy

If you want to compile it yourself

  1. install latest Rust
  2. install maturin
  3. maturin build --release
  4. cd ./target/wheels/
  5. pip install [name-wheel].whl will install it to your local Python

Development

  1. install Rust (v1.39+)
  2. install maturin
  3. maturin develop
  4. move to another folder, and import cjvalpy shouldn't return any error

Usage

Made to be used with cjio:

cjio myfile.city.json validate

but can be used directly in python:

import cjvalpy
import json
import urllib.request

f = open("~/data/noise.city.json")
fj = json.loads(f.read())
js = []
js.append(json.dumps(fj))
print("Downloading the Extension JSON schema file(s):")
if "extensions" in fj:
    for ext in fj["extensions"]:
        theurl = fj["extensions"][ext]["url"]
        try:
            with urllib.request.urlopen(fj["extensions"][ext]["url"]) as f:
                sf = f.read().decode('utf-8')
                js.append(sf)
        except:
            s = "'%s' cannot be downloaded\nAbort" % fj["extensions"][ext]["url"]
            raise Exception(s)
val = cjvalpy.CJValidator(js)
val.validate()
re = val.get_report()
print(val.get_report())

Metadata

Release files for cjvalpy 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cjvalpy 0.4.1
File
cjvalpy-0.4.1-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details
cjvalpy-0.4.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64 Details
cjvalpy-0.4.1-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
cjvalpy-0.4.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64, macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64) Details
cjvalpy-0.4.1-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details
cjvalpy-0.4.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64, macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64) Details
cjvalpy-0.4.1-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details
cjvalpy-0.4.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64, macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 15.9 MB

Release files / cjvalpy-0.4.1-cp311-none-win_amd64.whl

Download URL cjvalpy-0.4.1-cp311-none-win_amd64.whl
Size 1.3 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
44d40cc10e7719ee0b3c20c7d0eea8b39ed68670eb1c014e1472d0da0a72f68d
BLAKE2b-256 checksum
How to use checksums
6fc17b46ff65be9c8dd2a8560cc0851d73989e1796a6faf1cba6a6b845b22869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Release files / cjvalpy-0.4.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL cjvalpy-0.4.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 2.6 MB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7aebc9233be5d32109dc760c73b8d8a01b45f1d5ef235a8bd238d9234bd38bd4
BLAKE2b-256 checksum
How to use checksums
3a6a44f67d3164e88f9da2df8d525762fa62a31b553e47e2e1ae4c67f167ebbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Release files / cjvalpy-0.4.1-cp310-none-win_amd64.whl

Download URL cjvalpy-0.4.1-cp310-none-win_amd64.whl
Size 1.3 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
34e40838737fad68aef0774182b984e6949160b5dd31ca18078f0168ce120e4b
BLAKE2b-256 checksum
How to use checksums
ed43b674d49500270f7c2d7dd304e395db25ba271ed5a9ec2466e3515bd08000
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Release files / cjvalpy-0.4.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL cjvalpy-0.4.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 2.6 MB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
56913300115cc7e96bdfe9be318fe3c3f2e6a20866ef3b686bd17a72c90f8fdb
BLAKE2b-256 checksum
How to use checksums
92114927220b044f825b5ef4b4901fb0abe3994914911f46551fd02678970ee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Release files / cjvalpy-0.4.1-cp39-none-win_amd64.whl

Download URL cjvalpy-0.4.1-cp39-none-win_amd64.whl
Size 1.3 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
bd47e4b4bad5620840bf64efa96e33a32d764cd5a7f7181c8d329fb772948915
BLAKE2b-256 checksum
How to use checksums
308c54fd461836e04d935c4e985e5b3271d708da21847101a58dfce477e448d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Release files / cjvalpy-0.4.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL cjvalpy-0.4.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 2.6 MB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fdfa947f299c6bc17d680552491152e1071788c17eafceb173bd50fdf1bb4d54
BLAKE2b-256 checksum
How to use checksums
cfecb47f1541c0a625f70f16a2694e5346a03e87f24a0d6c23d8bbdc7e566b46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Release files / cjvalpy-0.4.1-cp38-none-win_amd64.whl

Download URL cjvalpy-0.4.1-cp38-none-win_amd64.whl
Size 1.3 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
400f04dd35786187d36beade483b483cbc0410faff7c7fab74ebab59d881773b
BLAKE2b-256 checksum
How to use checksums
237013259010b1a9bd2d2fda18bfbd4466618676f89da33d5a83fc34b874e8c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Release files / cjvalpy-0.4.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL cjvalpy-0.4.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 2.6 MB
Tags CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9623b5ac378727eb1dc47e288acede7f315fbb4d315ba9a3443fc6ac2ab62894
BLAKE2b-256 checksum
How to use checksums
1862955598b265dcb5942acf7c6179f10df093ec0a38f8a64b0cdcec9e743ab0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.1

Security for cjvalpy 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page