Skip to main content

A Python middleware service for managing Port.io guides (blueprints, actions, mappings, widgets)

Project description

Port OneClick Middleware

A Python middleware service for managing Port.io guides, blueprints, actions, mappings, and widgets.

Quick Start

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
export PORT_CLIENT_ID=your_client_id
export PORT_CLIENT_SECRET=your_client_secret

# Run the middleware
python main.py

Configuration

Required Environment Variables

PORT_CLIENT_ID=your_client_id
PORT_CLIENT_SECRET=your_client_secret

Optional Environment Variables

# Directory paths (defaults shown)
BLUEPRINTS_DIR=setup/blueprints
ACTIONS_DIR=setup/actions
MAPPINGS_DIR=setup/mappings
WIDGETS_DIR=setup/widgets

# Action filter - what to process
ACTION=all  # Options: all, blueprints, actions, mappings, widgets

# Required folders - comma-separated list
# Only folders in this list will be required to exist
EXPECTED_FOLDERS=blueprints,actions,mappings,widgets  # Default: all folders

Features

Flexible Folder Requirements

You can specify which folders are required using the EXPECTED_FOLDERS environment variable:

  • Default behavior: All folders (blueprints, actions, mappings, widgets) are required
  • Custom requirements: Only folders listed in EXPECTED_FOLDERS are required
  • Missing non-required folders: Will be skipped without causing errors

Example:

# Only require blueprints and widgets folders
EXPECTED_FOLDERS=blueprints,widgets python main.py

# If actions or mappings folders are missing, they will be skipped

Usage Examples

# Process all resources
python main.py

# Process only blueprints
ACTION=blueprints python main.py

# Process everything, but only require blueprints and actions to exist
EXPECTED_FOLDERS=blueprints,actions python main.py

For detailed configuration options, see CONFIG.md.

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

port_oneclick_mw-0.1.3.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

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

port_oneclick_mw-0.1.3-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file port_oneclick_mw-0.1.3.tar.gz.

File metadata

  • Download URL: port_oneclick_mw-0.1.3.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for port_oneclick_mw-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8cfd052870910b1857616a5b84dfa597885842eef6fe44769964dac5a6d62ded
MD5 597729efe221a206ddc90c6fc000de95
BLAKE2b-256 e1f71d566daec5e1bb0408a0b94b135bf0274a37c34e2ebffe70f155577153af

See more details on using hashes here.

File details

Details for the file port_oneclick_mw-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for port_oneclick_mw-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f3fddf9d4591c1f6fc5ec75d3cc15446ce2da916c620f68bb7f1f5fbd2ce3aba
MD5 c54cb236cfe33fd28dcc9b8841237c6a
BLAKE2b-256 f27460feaa4195b16519ba3dea3de2b30fb37a5734b919b8f12d6f49246072ec

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