semvec/pypi-packages huggingface dataset:
intersystems-pyprod 0.1.0
Pure Python Interoperability Productions using InterSystems IRIS
Requires Python: >=3.9

# intersystems_pyprod

intersystems_pyprod, short for InterSystems Python Productions, is a library that allows you to create different components for the InterSystems Productions Framework, purely in python. Productions provide the integration engine to connect systems that use different communication protocols and different message formats.

![SystemDiagramOfProductions](https://github.com/intersystems/pyprod/blob/main/docs/HelloWorldFiles/SystemDiagramOfProductions.png?raw=true)

## Example
The following is a Business Process written using intersystems_pyprod. It just returns the request it receives, back to the sender.

First follow [steps to setup environment variables](https://github.com/intersystems/pyprod/blob/main/docs/installing.md) to connect to a running iris instance.

```python
# save this as HelloWorld.py
from intersystems_pyprod import (BusinessProcess,Status)

class HelloWorldBP(BusinessProcess):
    def OnRequest(self, request):
        return Status.OK(), request

```

The following assumes you have set the environment variables.

```bash
$ intersystems_pyprod /full/path/to/HelloWorld.py

    Loading HelloWorldBP to IRIS...
    ...
    ...
    Load finished successfully.
```


Create a production using the UI

![HelloWorldProductionSetup](https://github.com/intersystems/pyprod/blob/main/docs/HelloWorldFiles/HelloWorldProductionSetup.png?raw=true)

This production reads in a file from a defined path and then forwards it to a target business process. We use a pre-existing Business Service called Enslib.File.PassthroughService. We set a path from where it reads in the file. Then we select the Business Process that we created as its target. Note, the Business Process has the name of the script (HelloWorld) appended to it. Read more about package names [here](https://github.com/intersystems/pyprod/blob/main/docs/apireference.md#-package-name-project-organization-). 

Start the Production add then add a text file at the file path defined for the business service. Upon refreshing the production page, we can see the messages that were deliverd. 

![HelloWorldResults](https://github.com/intersystems/pyprod/blob/main/docs/HelloWorldFiles/HelloWorldResults.png?raw=true)


NOTE: EnsLib.File.PassthroughService is an existing Business Service bundled with IRIS Productions. It loads a file from a given location and passes it forward to the desired target.


## Reporting Issues

Please report issues via GitHub Issues.

## Contributing 

See [Contributing guidelines](https://github.com/intersystems/pyprod/blob/main/.github/CONTRIBUTING.md)

## Useful links

[Installing](https://github.com/intersystems/pyprod/blob/main/docs/installing.md)

[Quick Start](https://github.com/intersystems/pyprod/blob/main/docs/quickstart.md)

[Debugging](https://github.com/intersystems/pyprod/blob/main/docs/debugging.md)

[API Reference](https://github.com/intersystems/pyprod/blob/main/docs/apireference.md)

[Changelog](https://github.com/intersystems/pyprod/blob/main/CHANGELOG.md)
urn-citation 0.7.2
A Python library for working with CITE architecture URNs for scholarly citation.
Requires Python: >=3.14

# `urn_citation`

A Python library for working with CITE architecture URNs for scholarly citation.

## Overview

`urn_citation` provides Pydantic-based models for representing and parsing Uniform Resource Names (URNs) defined for the CITE architecture. The current release supports Canonical Text Service (CTS) URNs, which are used to identify passages of canonically citable texts with hierarchical work and passage components.


## Features

- **Pydantic Models**: Type-safe URN representations with validation
- **CTS URN Support**: Full support for parsing and creating Canonical Text Service URNs
- **Flexible Parsing**: Parse CTS URN strings into structured objects
- **Optional Fields**: Support for optional work, version, exemplar, and passage components

## Installation

```bash
pip install urn-citation
```

## Quick Start

### Creating a CTS URN

```python
from urn_citation import CtsUrn

# Create a CTS URN with required fields
urn = CtsUrn(
    urn_type="cts",
    namespace="greekLit",
    text_group="tlg0012"
)

# Create a CTS URN with all fields
urn_full = CtsUrn(
    urn_type="cts",
    namespace="greekLit",
    text_group="tlg0012",
    work="001",
    version="wacl1",
    exemplar="ex1",
    passage="1.1-1.5"
)
```

### Parsing from a String

```python
# Parse a CTS URN from a colon-delimited string
urn_string = "urn:cts:greekLit:tlg0012.001.wacl1:1.1-1.5"
urn = CtsUrn.from_string(urn_string)

print(urn.text_group)  # "tlg0012"
print(urn.work)        # "001"
print(urn.version)     # "wacl1"
print(urn.passage)     # "1.1-1.5"
```

### Serialization

```python
# Convert to dictionary
urn_dict = urn.model_dump()

# Convert to JSON
urn_json = urn.model_dump_json()
```

## CTS URN Structure

A CTS URN follows the format:

```
urn:cts:<namespace>:<work_component>:<passage_component>
```

Where:
- **namespace**: The namespace defining the text collection (e.g., "greekLit", "latinLit")
- **work_component**: One to four dot-delimited identifiers for text group, work, version, and exemplar
- **passage_component**: Optional passage reference, may contain a single passage or range (with hyphen)


## License

See the LICENSE file for details.