Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
From the official CZML Guide:
CZML is a JSON format for describing a time-dynamic graphical scene, primarily for display in a web browser running Cesium. It describes lines, points, billboards, models, and other graphical primitives, and specifies how they change with time.
czml3 aims to make the process of writing CZML files in Python easy by:
You can install czml3 using pip:
pip install czml3
or conda:
conda install czml3 --channel conda-forge
A CZML document is a list of packets, which have several properties. Recreating the blue box from Cesium sandcastle's CZML Box:
from czml3 import CZML_VERSION, Document, Packet
from czml3.properties import (
Box,
BoxDimensions,
Color,
Material,
Position,
SolidColorMaterial,
)
from czml3.types import Cartesian3Value
packet_box = Packet(
id="my_id",
position=Position(cartographicDegrees=[-114.0, 40.0, 300000.0]),
box=Box(
dimensions=BoxDimensions(
cartesian=Cartesian3Value(values=[400000.0, 300000.0, 500000.0])
),
material=Material(
solidColor=SolidColorMaterial(color=Color(rgba=[0, 0, 255, 255]))
),
),
)
doc = Document(
packets=[Packet(id="document", name="box", version=CZML_VERSION), packet_box]
)
print(doc)
[
{
"id": "document",
"name": "box",
"version": "1.0"
},
{
"id": "my_id",
"position": {
"cartographicDegrees": [
-114.0,
40.0,
300000.0
]
},
"box": {
"dimensions": {
"cartesian": [
400000.0,
300000.0,
500000.0
]
},
"material": {
"solidColor": {
"color": {
"rgba": [
0.0,
0.0,
255.0,
255.0
]
}
}
}
}
}
]
czml3 uses pydantic for all classes. As such czml3 is able to coerce data to their right type. For example, the following creates a Position property of doubles using a numpy array of interger type:
import numpy as np
from czml3.properties import Position
print(Position(cartographicDegrees=np.array([-114, 40, 300000], dtype=int)))
{
"cartographicDegrees": [
-114.0,
40.0,
300000.0
]
}
You want to contribute? Awesome! There are lots of CZML properties and validations that we still did not implement, which can be found here.
All ideas welcome!
FAQs
Python 3 library to write CZML
We found that czml3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.