Skip to main content

SmartGridready Specification Library

Project description

zsh: no matches found: xsdata[cli]# SmartGridready Specification

The specification library contains the classes generated from the SGr XML schema.

The actual XML schema files reside in the separate SGrSpecifications repository .

Contents

Directory Structure

  • pyproject.toml is the main project configuration file.
  • setup.py is used to build the library package using setuptools.
  • src/sgr_specification contains the generated sources of the specification, with sgr_specification being the root of the namespace. The directory is empty, unless the sources are generated from the XML schema.

Build Instructions

Prerequisites

Install xsdata CLI:

pip install xsdata[cli]

Check out both the SGrPython and the SGrSpecifications repositories alongside each other, e.g. in SGrSpecifications and SGrPython.

Generate Sources

Generate specification source code from XML schema:

cd SGrPython/specification/src
rm -rf ./sgr_specification/v0
xsdata generate ../../../SGrSpecifications/SchemaDatabase/SGr -r --package sgr_specification.v0

Build and Use Package

Create and activate virtual environment:

cd SGrPython
python -m venv .venv

# On Linux call this:
source ./.venv/bin/activate

# On Windows call this:
.\.venv\Scripts\Activate.ps1

Build package and install in virtual environment:

cd SGrPython/specification
pip install -e .

You can use the package SGrSpecificationPythontks4r from within the virtual environment now.

Note: The designated package name sgr-specification must not be used until the PyPI administrators have approved a SmartGridready organization account.

Clean Up

Deactivate the virtual environment after use:

cd SGrPython
deactivate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file sgrspecificationpythontks4r-2.0.dev20250304.tar.gz.

File metadata

File hashes

Hashes for sgrspecificationpythontks4r-2.0.dev20250304.tar.gz
Algorithm Hash digest
SHA256 559ca0a4d099cfffca05c5df95eff6c56ce1571be02597f7495e6ab27cf291ad
MD5 cf2ea58284351cf477a176883c023a93
BLAKE2b-256 5b5196460aeac93904f9c6ed13b4f997657d2150c662f720c92b176d5d2dfa59

See more details on using hashes here.

File details

Details for the file sgrspecificationpythontks4r-2.0.dev20250304-py3-none-any.whl.

File metadata

File hashes

Hashes for sgrspecificationpythontks4r-2.0.dev20250304-py3-none-any.whl
Algorithm Hash digest
SHA256 8f78e2f5e96b2b66426a48eabdf84f6b653687df3848193a264686e5687c33b7
MD5 20d88b16b101e929b21c12d732cd690c
BLAKE2b-256 0dcaf4fc36ddd3f8b666c26b1fc5397cca089a61a7b52b425dd9f2ec9b80fe88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page