Skip to main content

Pragma Provider

Built-in platform resources for Pragmatiks.

Declaratively manage secrets, non-sensitive configuration, and file storage alongside the rest of your infrastructure. The resources in this provider are available out of the box in every organization and are commonly referenced by other providers through FieldReference.

Installation

pip install pragmatiks-pragma-provider

or with uv:

uv add pragmatiks-pragma-provider

Resources

Resource Type Slug Description
Secret pragma/secret Platform-managed secrets referenced by other resources
Config pragma/config Non-sensitive configuration values shared across resources
File pragma/file Platform-managed file storage with public download URLs

Secret

Stores sensitive key-value data and exposes each entry as an output so that other resources can reference individual values through FieldReference.

Config:

  • data (dict[str, str], required, mutable) -- Key-value pairs of secret data. Values must be strings.

Outputs:

  • Each key-value pair from data is exposed as a separately referenceable output field (e.g., outputs.username, outputs.password).
resources:
  database-credentials:
    provider: pragma
    resource: secret
    config:
      data:
        username: app_service
        password: hunter2

Behavior:

  • Create: Stores each key as a separate output for downstream references.
  • Update: Replaces the full output set with the new data keys and values.
  • Delete: No-op. Secret state is held alongside the resource itself.

Config

Non-sensitive configuration store. Unlike pragma/secret, values may be any JSON-serializable type, which makes it a natural place to keep shared defaults (project IDs, regions, feature flags) that many resources reference.

Config:

  • data (dict[str, Any], required, mutable) -- Key-value pairs of configuration data. Values may be strings, numbers, booleans, lists, or nested objects.

Outputs:

  • Each key-value pair from data is exposed as a separately referenceable output field (e.g., outputs.project_id, outputs.region), preserving its original type.
resources:
  gcp-defaults:
    provider: pragma
    resource: config
    config:
      data:
        project_id: my-gcp-project
        region: us-central1
        tags:
          - production
          - primary

Behavior:

  • Create: Stores each key as a separate output for downstream references.
  • Update: Replaces the full output set with the new data keys and values.
  • Delete: No-op. Config state is held alongside the resource itself.

File

Platform-managed file storage. The actual file content is uploaded through the Pragmatiks API (POST /files/{name}/upload); this resource reads the uploaded metadata and exposes URLs, size, and checksum as outputs.

Config: none -- the resource tracks a file already uploaded through the Pragmatiks API under the resource's name.

Outputs:

  • url -- Internal pragma:// URL used for cross-resource references.
  • public_url -- Public HTTP URL for external download.
  • size -- File size in bytes.
  • content_type -- MIME type stored at upload time.
  • checksum -- SHA256 hash of the file content.
  • uploaded_at -- Timestamp the file was uploaded.
resources:
  onboarding-doc:
    provider: pragma
    resource: file
    config: {}

Behavior:

  • Create: Reads the uploaded file metadata and exposes URLs, size, and checksum as outputs. Fails with a clear error if the file content has not been uploaded yet.
  • Update: Re-reads the metadata from storage so outputs reflect the latest uploaded version.
  • Delete: Removes both the file content and its metadata from the underlying object store. Idempotent -- missing files are treated as already deleted.

Runtime Environment

The pragma/file resource reads storage configuration from environment variables populated by the Pragmatiks runtime. Standalone use is not supported.

Variable Purpose
PRAGMA_FILE_GCS_BUCKET Object-store bucket holding uploaded file content
PRAGMA_FILE_PUBLIC_URL Base URL used to compose public download URLs
PRAGMA_RUNTIME_ORGANIZATION_ID Identifies the organization's file prefix in the bucket

Development

# Run tests
task pragma:test

# Lint and type check
task pragma:check

# Format
task pragma:format

Metadata

Release files for pragmatiks-pragma-provider 5.1.2

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

Source distribution (sdist)

Source distribution for pragmatiks-pragma-provider 5.1.2
File Size Uploaded
pragmatiks_pragma_provider-5.1.2.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pragmatiks-pragma-provider 5.1.2
File Interpreter ABI Platform
pragmatiks_pragma_provider-5.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / pragmatiks_pragma_provider-5.1.2.tar.gz

Download URL pragmatiks_pragma_provider-5.1.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dc238c64896c2f85dcffebe29be50fd04e0bf1aeaf045b70661e31a6c45cf797
BLAKE2b-256 checksum
How to use checksums
e191da6e74d33ee3b39bf4689abe7710a38757a0d5cf837180cdd37035b53bff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / pragmatiks_pragma_provider-5.1.2-py3-none-any.whl

Download URL pragmatiks_pragma_provider-5.1.2-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
999c187af97701a5e026aa27d371fc245520b5367f68157e56dec9c0d8744e7c
BLAKE2b-256 checksum
How to use checksums
5e06b02c1898f360f78357cc6af8fc785690a56aaf18235fa42d4e0e7dc9c835
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Release history Release notifications | RSS feed

6.2.0

2 release files

6.1.1

2 release files

6.1.0

2 release files

6.0.0

2 release files

5.1.8

2 release files

5.1.7

2 release files

5.1.6

2 release files

5.1.5

2 release files

5.1.4

2 release files

5.1.3

2 release files

This release

5.1.2 This release

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.0.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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