โ† Open Source

๐ŸŒŠ Ocean ๐ŸŒŠ is Port's open source framework for bringing live data from third-party systems into Port, the platform for building your AI software factory.

MiscPython
Momentum
+0stars in 24 hours0.0%
201
Stars
168
Forks
+1
This week
99
Contributors
Created 2023-05-22 ยท Updated 2026-12-02 ยท #27940 today
Top developers
README

Ocean

Ocean is Port's open source integration framework. It makes it easy to ingest data from your third-party tools and infrastructure into Port, the platform for building your AI software factory.

Prerequisites

  • Python 3.12

Installation

In order to install the Ocean Framework, run the following command:

pip install "port-ocean[cli]"

Or

poetry add "port-ocean[cli]"

Run Integration

  1. source the integration venv

    . .venv/bin/activate
  2. Run

    ocean sail ./path/to/integration

Export Architecture

Real-Time updates Architecture

Integration Lifecycle

Folder Structure

The Ocean Integration Framework follows a specific folder structure within this mono repository. This structure ensures proper organization and easy identification of integration modules. The suggested folder structure is as follows:

port-ocean/
โ”œโ”€โ”€ port_ocean (framework)/
โ”‚ โ”œโ”€โ”€ ocean.py
โ”‚ โ”œโ”€โ”€ core/
| โ””โ”€โ”€ ...
โ””โ”€โ”€ integrations/
โ”‚  โ””โ”€โ”€โ”€ integration_name/
โ”‚     โ”œโ”€โ”€โ”€โ”€ main.py
โ”‚     โ”œโ”€โ”€โ”€โ”€ pyproject.toml
โ”‚     โ””โ”€โ”€โ”€โ”€ Dockerfile
โ”œโ”€โ”€ ...
โ””โ”€โ”€ ...
  • The framework folder contains the core logic for managing the integration lifecycle.
  • Each integration is represented by a separate folder inside the integrations directory.
  • Inside each integration folder, you'll find a main.py file that implements the core functionality of the integration for the specific third-party system.
  • The pyproject.toml file inside each integration folder lists the required dependencies for that integration.

Configuration

The Integration Framework utilizes a config.yaml file for its configuration. This file defines both the framework configuration and the integration configuration within it. Each integration is identified by its type and unique identifier, which are utilized during initialization to appropriately update Port.

Example config.yaml:

# This is an example configuration file for the integration service.
# Please copy this file to config.yaml file in the integration folder and edit it to your needs.

port:
  clientId: PORT_CLIENT_ID # Can be loaded via environment variable: PORT_CLIENT_ID
  clientSecret: PORT_CLIENT_SECRET # Can be loaded via environment variable: PORT_CLIENT_SECRET
  baseUrl: https://api.getport.io/v1
# The event listener to use for the integration service.
eventListener:
  type: KAFKA / WEBHOOK
integration:
  # The name of the integration.
  identifier: "my_integration"
  # The type of the integration.
  type: "PagerDuty"
  config:
    my_git_token: "random"
    some_other_integration_config: "Very important information"

Contributing

The reason Ocean is open source is that we aim for the Port integration library to offer numerous useful out-of-the-box integrations. We have confidence that developers and DevOps professionals who rely on Port in their everyday work will be inclined to contribute and assist in making it a comprehensive tool.

In order to learn how you can contribute to Ocean, read our contributing guide

Local Development (Framework)

  1. Clone the repository

  2. Install dependencies:

    make install

    Or (For installing integrations dependencies as well)

    make install/all
  3. source the integration venv

    . .venv/bin/activate

Local Development (Integration)

  1. Clone the repository

  2. For new integration run

    make new

    and follow the instructions

  3. Install dependencies

  4. cd DESIRED_INTEGRATION_FOLDER && make install
  5. source the integration venv

    . .venv/bin/activate
  6. Run the integration

    make run

    Or

    ocean sail

Local Redis (live events and centralized rate limiter)

Live events (Redis streams) and the centralized rate limiter need Redis. For local runs, start one in Docker (logical DB 0 for live events, DB 1 for the rate limiter):

make redis/up && eval "$(make -s redis/env)"

Run ocean sail in the same shell. make redis/env only prints the OCEAN__* exports, so eval is what applies them to your shell.

Command Description
make redis/up Start Redis on localhost:6379 (idempotent)
make redis/env Print the OCEAN__LIVE_EVENTS__* and OCEAN__CENTRALIZED_RATE_LIMITER__* exports
make redis/status Container state, PING, and key count per DB
make redis/down Stop and remove the container (data is not persisted)
./scripts/local-redis.sh cli Open redis-cli in the container

If port 6379 is already in use, pick another one and pass it to every command, e.g. OCEAN_LOCAL_REDIS_PORT=6380 make redis/up.

License

The Ocean Framework is open-source software licensed under the Apache 2.0 License. See the LICENSE file for more information.

Contact

For any questions or inquiries, please reach out to our team at support@getport.io

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store