blob: 0e13ead8897c4020b432dd625431f852db6e6946 [file] [log] [blame]
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<!-- Elements added to main will be displayed on all pages -->
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Python library for Apache StreamPipes">
<meta name="author" content="Apache Software Foundation (ASF)">
<link rel="canonical" href="https://streampipes.apache.org/docs/docs/python/latest/latest/getting-started/developing/">
<link rel="prev" href="../first-steps/">
<link rel="next" href="../quickstart/">
<link rel="icon" href="https://streampipes.apache.org/img/favicon/favicon.png">
<meta name="generator" content="mkdocs-1.5.2, mkdocs-material-9.2.5">
<title>Developing & Contributing - Apache StreamPipes Python</title>
<link rel="stylesheet" href="../../assets/stylesheets/main.0e669242.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.85d0ee34.min.css">
<link rel="stylesheet" href="../../assets/_mkdocstrings.css">
<link rel="stylesheet" href="../../stylesheets/extra.css">
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
/* Measure a visit to flink.apache.org and nightlies.apache.org/flink as the same visit */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "//analytics.apache.org/";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '35']);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.async = true;
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
</script>
<script>"undefined"!=typeof __md_analytics&&__md_analytics()</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
<script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#development-guide" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
</div>
<header class="md-header md-header--shadow md-header--lifted" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="https://streampipes.apache.org/" title="Apache StreamPipes Python" class="md-header__button md-logo" aria-label="Apache StreamPipes Python" data-md-component="logo">
<img src="https://streampipes.apache.org/img/sp-logo-white-right.png" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Apache StreamPipes Python
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Developing & Contributing
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9v1Z"/></svg>
</label>
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5Z"/></svg>
</label>
</form>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/apache/streampipes" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
apache/streampipes
</div>
</a>
</div>
</nav>
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item">
<a href="../.." class="md-tabs__link">
๐Ÿก Home
</a>
</li>
<li class="md-tabs__item md-tabs__item--active">
<a href="../first-steps/" class="md-tabs__link">
๐Ÿš€ Getting Started
</a>
</li>
<li class="md-tabs__item">
<a href="../../tutorials/1-introduction-to-streampipes-python-client/" class="md-tabs__link">
๐Ÿค“ Tutorials
</a>
</li>
<li class="md-tabs__item">
<a href="../../reference/client/client/" class="md-tabs__link">
๐Ÿ“š Reference
</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="https://streampipes.apache.org/" title="Apache StreamPipes Python" class="md-nav__button md-logo" aria-label="Apache StreamPipes Python" data-md-component="logo">
<img src="https://streampipes.apache.org/img/sp-logo-white-right.png" alt="logo">
</a>
Apache StreamPipes Python
</label>
<div class="md-nav__source">
<a href="https://github.com/apache/streampipes" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
apache/streampipes
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../.." class="md-nav__link">
<span class="md-ellipsis">
๐Ÿก Home
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" checked>
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
๐Ÿš€ Getting Started
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
๐Ÿš€ Getting Started
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../first-steps/" class="md-nav__link">
<span class="md-ellipsis">
First Steps
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
Developing & Contributing
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Developing & Contributing
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#development-guide" class="md-nav__link">
๐Ÿ“– Development Guide
</a>
<nav class="md-nav" aria-label="๐Ÿ“– Development Guide">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#first-steps" class="md-nav__link">
๐Ÿš€ First Steps
</a>
</li>
<li class="md-nav__item">
<a href="#conventions" class="md-nav__link">
๐Ÿ‘ Conventions
</a>
</li>
<li class="md-nav__item">
<a href="#dependency-management" class="md-nav__link">
๐Ÿ“ฆ Dependency Management
</a>
</li>
<li class="md-nav__item">
<a href="#documentation" class="md-nav__link">
๐Ÿ“šDocumentation
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#roadmap" class="md-nav__link">
๐Ÿš€ Roadmap
</a>
</li>
<li class="md-nav__item">
<a href="#contributing" class="md-nav__link">
๐Ÿ‘จโ€๐Ÿ’ป Contributing
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../quickstart/" class="md-nav__link">
<span class="md-ellipsis">
Quickstart
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
<span class="md-ellipsis">
๐Ÿค“ Tutorials
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
๐Ÿค“ Tutorials
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../tutorials/1-introduction-to-streampipes-python-client/" class="md-nav__link">
<span class="md-ellipsis">
Introduction to StreamPipes Python
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../tutorials/2-extracting-data-from-the-streampipes-data-lake/" class="md-nav__link">
<span class="md-ellipsis">
Extracting Data from the StreamPipes data lake
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../tutorials/3-getting-live-data-from-the-streampipes-data-stream/" class="md-nav__link">
<span class="md-ellipsis">
Getting live data from the StreamPipes data stream
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../tutorials/4-using-online-machine-learning-on-a-streampipes-data-stream/" class="md-nav__link">
<span class="md-ellipsis">
Using Online Machine Learning on a StreamPipes data stream
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
<span class="md-ellipsis">
๐Ÿ“š Reference
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
๐Ÿ“š Reference
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_1" >
<label class="md-nav__link" for="__nav_4_1" id="__nav_4_1_label" tabindex="0">
<span class="md-ellipsis">
Client
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_1">
<span class="md-nav__icon md-icon"></span>
Client
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/client/client/" class="md-nav__link">
<span class="md-ellipsis">
Client
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/client/config/" class="md-nav__link">
<span class="md-ellipsis">
Config
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/client/credential_provider/" class="md-nav__link">
<span class="md-ellipsis">
Credential provider
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_2" >
<label class="md-nav__link" for="__nav_4_2" id="__nav_4_2_label" tabindex="0">
<span class="md-ellipsis">
Endpoint
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_2">
<span class="md-nav__icon md-icon"></span>
Endpoint
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/endpoint/endpoint/" class="md-nav__link">
<span class="md-ellipsis">
Endpoint
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/endpoint/exceptions/" class="md-nav__link">
<span class="md-ellipsis">
Exceptions
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_2_3" >
<label class="md-nav__link" for="__nav_4_2_3" id="__nav_4_2_3_label" tabindex="0">
<span class="md-ellipsis">
Api
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_2_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_2_3">
<span class="md-nav__icon md-icon"></span>
Api
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/endpoint/api/data_lake_measure/" class="md-nav__link">
<span class="md-ellipsis">
Data lake measure
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/endpoint/api/data_stream/" class="md-nav__link">
<span class="md-ellipsis">
Data stream
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/endpoint/api/version/" class="md-nav__link">
<span class="md-ellipsis">
Version
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_3" >
<label class="md-nav__link" for="__nav_4_3" id="__nav_4_3_label" tabindex="0">
<span class="md-ellipsis">
Function zoo
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_3">
<span class="md-nav__icon md-icon"></span>
Function zoo
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/function_zoo/river_function/" class="md-nav__link">
<span class="md-ellipsis">
River function
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4" >
<label class="md-nav__link" for="__nav_4_4" id="__nav_4_4_label" tabindex="0">
<span class="md-ellipsis">
Functions
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4">
<span class="md-nav__icon md-icon"></span>
Functions
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/functions/function_handler/" class="md-nav__link">
<span class="md-ellipsis">
Function handler
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/registration/" class="md-nav__link">
<span class="md-ellipsis">
Registration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/streampipes_function/" class="md-nav__link">
<span class="md-ellipsis">
Streampipes function
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4_4" >
<label class="md-nav__link" for="__nav_4_4_4" id="__nav_4_4_4_label" tabindex="0">
<span class="md-ellipsis">
Broker
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_4_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4_4">
<span class="md-nav__icon md-icon"></span>
Broker
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/functions/broker/broker/" class="md-nav__link">
<span class="md-ellipsis">
Broker
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/broker/broker_handler/" class="md-nav__link">
<span class="md-ellipsis">
Broker handler
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/broker/consumer/" class="md-nav__link">
<span class="md-ellipsis">
Consumer
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/broker/output_collector/" class="md-nav__link">
<span class="md-ellipsis">
Output collector
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/broker/publisher/" class="md-nav__link">
<span class="md-ellipsis">
Publisher
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4_4_6" >
<label class="md-nav__link" for="__nav_4_4_4_6" id="__nav_4_4_4_6_label" tabindex="0">
<span class="md-ellipsis">
Kafka
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_4_4_4_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4_4_6">
<span class="md-nav__icon md-icon"></span>
Kafka
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/functions/broker/kafka/kafka_consumer/" class="md-nav__link">
<span class="md-ellipsis">
Kafka consumer
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/broker/kafka/kafka_message_fetcher/" class="md-nav__link">
<span class="md-ellipsis">
Kafka message fetcher
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/broker/kafka/kafka_publisher/" class="md-nav__link">
<span class="md-ellipsis">
Kafka publisher
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4_4_7" >
<label class="md-nav__link" for="__nav_4_4_4_7" id="__nav_4_4_4_7_label" tabindex="0">
<span class="md-ellipsis">
Nats
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_4_4_4_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4_4_7">
<span class="md-nav__icon md-icon"></span>
Nats
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/functions/broker/nats/nats_consumer/" class="md-nav__link">
<span class="md-ellipsis">
Nats consumer
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/broker/nats/nats_publisher/" class="md-nav__link">
<span class="md-ellipsis">
Nats publisher
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4_5" >
<label class="md-nav__link" for="__nav_4_4_5" id="__nav_4_4_5_label" tabindex="0">
<span class="md-ellipsis">
Utils
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_4_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4_5">
<span class="md-nav__icon md-icon"></span>
Utils
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/functions/utils/async_iter_handler/" class="md-nav__link">
<span class="md-ellipsis">
Async iter handler
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/utils/data_stream_context/" class="md-nav__link">
<span class="md-ellipsis">
Data stream context
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/utils/data_stream_generator/" class="md-nav__link">
<span class="md-ellipsis">
Data stream generator
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/functions/utils/function_context/" class="md-nav__link">
<span class="md-ellipsis">
Function context
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_5" >
<label class="md-nav__link" for="__nav_4_5" id="__nav_4_5_label" tabindex="0">
<span class="md-ellipsis">
Model
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_5">
<span class="md-nav__icon md-icon"></span>
Model
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/model/common/" class="md-nav__link">
<span class="md-ellipsis">
Common
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_5_2" >
<label class="md-nav__link" for="__nav_4_5_2" id="__nav_4_5_2_label" tabindex="0">
<span class="md-ellipsis">
Container
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_5_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_5_2">
<span class="md-nav__icon md-icon"></span>
Container
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/model/container/data_lake_measures/" class="md-nav__link">
<span class="md-ellipsis">
Data lake measures
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/container/data_streams/" class="md-nav__link">
<span class="md-ellipsis">
Data streams
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/container/resource_container/" class="md-nav__link">
<span class="md-ellipsis">
Resource container
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/container/versions/" class="md-nav__link">
<span class="md-ellipsis">
Versions
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_5_3" >
<label class="md-nav__link" for="__nav_4_5_3" id="__nav_4_5_3_label" tabindex="0">
<span class="md-ellipsis">
Resource
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_5_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_5_3">
<span class="md-nav__icon md-icon"></span>
Resource
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../reference/model/resource/data_lake_measure/" class="md-nav__link">
<span class="md-ellipsis">
Data lake measure
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/resource/data_series/" class="md-nav__link">
<span class="md-ellipsis">
Data series
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/resource/data_stream/" class="md-nav__link">
<span class="md-ellipsis">
Data stream
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/resource/exceptions/" class="md-nav__link">
<span class="md-ellipsis">
Exceptions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/resource/function_definition/" class="md-nav__link">
<span class="md-ellipsis">
Function definition
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/resource/query_result/" class="md-nav__link">
<span class="md-ellipsis">
Query result
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/resource/resource/" class="md-nav__link">
<span class="md-ellipsis">
Resource
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../reference/model/resource/version/" class="md-nav__link">
<span class="md-ellipsis">
Version
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#development-guide" class="md-nav__link">
๐Ÿ“– Development Guide
</a>
<nav class="md-nav" aria-label="๐Ÿ“– Development Guide">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#first-steps" class="md-nav__link">
๐Ÿš€ First Steps
</a>
</li>
<li class="md-nav__item">
<a href="#conventions" class="md-nav__link">
๐Ÿ‘ Conventions
</a>
</li>
<li class="md-nav__item">
<a href="#dependency-management" class="md-nav__link">
๐Ÿ“ฆ Dependency Management
</a>
</li>
<li class="md-nav__item">
<a href="#documentation" class="md-nav__link">
๐Ÿ“šDocumentation
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#roadmap" class="md-nav__link">
๐Ÿš€ Roadmap
</a>
</li>
<li class="md-nav__item">
<a href="#contributing" class="md-nav__link">
๐Ÿ‘จโ€๐Ÿ’ป Contributing
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1>Developing & Contributing</h1>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<h2 id="development-guide">๐Ÿ“– Development Guide<a class="headerlink" href="#development-guide" title="Permanent link">&para;</a></h2>
<p>This document describes how to easily set up your local dev environment to work on StreamPipes Python ๐Ÿ.
<br></p>
<h3 id="first-steps">๐Ÿš€ First Steps<a class="headerlink" href="#first-steps" title="Permanent link">&para;</a></h3>
<p>1) <strong>Set up your Python environment</strong></p>
<p>Create a virtual Python environment using a tool of your choice.
To manage dependencies, we use <a href="https://python-poetry.org/">Poetry</a>, so please install poetry in your local environment, e.g. via
<div class="language-bash highlight"><pre><span></span><code>pip<span class="w"> </span>install<span class="w"> </span>poetry
</code></pre></div></p>
<p>Once poetry is installed you can simply finalize your Python environment by running:</p>
<div class="language-bash highlight"><pre><span></span><code>poetry<span class="w"> </span>install<span class="w"> </span>--with<span class="w"> </span>dev,stubs<span class="w"> </span><span class="c1"># install everything that is required for the development</span>
poetry<span class="w"> </span>install<span class="w"> </span>--with<span class="w"> </span>docs<span class="w"> </span><span class="c1"># install everything to work with the documentation</span>
poetry<span class="w"> </span>install<span class="w"> </span>--with<span class="w"> </span>dev,stubs,docs<span class="w"> </span><span class="c1"># install all optional dependencies related to development</span>
</code></pre></div>
<p><br></p>
<p>2) <strong>Install pre-commit hook</strong></p>
<p>The pre-commit hook is run before every commit and takes care about code style,
linting, type hints, import sorting, etc. It will stop your commit in case the changes do not apply the expected format.
Always check to have the recent version of the pre-commit hook installed otherwise the CI build might fail.
If you are interested, you can have a deeper look on the underlying library: <a href="https://pre-commit.com/">pre-commit</a>.</p>
<p><div class="language-bash highlight"><pre><span></span><code>pre-commit<span class="w"> </span>install
</code></pre></div>
The definition of the pre-commit hook can be found in <a href="https://github.com/apache/streampipes/blob/dev/streampipes-client-python/.pre-commit-config.yaml">.pre-commit-config.yaml</a>.</p>
<p><br></p>
<h3 id="conventions">๐Ÿ‘ Conventions<a class="headerlink" href="#conventions" title="Permanent link">&para;</a></h3>
<p>Below we list some conventions that we have agreed on for creating StreamPipes Python.
Please comply to them when you plan to contribute to this project.
If you have any other suggestions or would like to discuss them, we would be happy to hear from you on our mailing list <a href="mailto:dev@streampipes.apache.org">dev@streampipes.apache.org</a>
or in our <a href="https://github.com/apache/streampipes/discussions">discussions</a> on GitHub.</p>
<p>1) <strong>Use <code>numpy</code> style for Python docstrings</strong> ๐Ÿ“„ <br>
Please stick to the <code>numpy</code> <a href="https://numpydoc.readthedocs.io/en/latest/format.html">style</a> when writing docstrings, as we require this for generating our documentation.</p>
<p>2) <strong>Provide tests</strong> โœ… <br>
We are aiming for broad test coverage for the Python package and
have therefore set a requirement of at least 90% unit test coverage.
Therefore, please remember to write (unit) tests already during development.
If you have problems with writing tests, don't hesitate to ask us for help directly in the PR or
even before that via our mailing list (see above).</p>
<!---
TODO: replace link to java file by link to documentation
--->
<p>3) <strong>Build a similar API as the Java client provides</strong> ๐Ÿ”„ <br>
Whenever possible, please try to develop the API of the Python library the same as the <a href="https://github.com/apache/streampipes/blob/dev/streampipes-client/src/main/java/org/apache/streampipes/client/StreamPipesClient.java">Java client</a> or Java SDK.
By doing so, we would like to provide a consistent developer experience and the basis for automated testing in the future.</p>
<h3 id="dependency-management">๐Ÿ“ฆ Dependency Management<a class="headerlink" href="#dependency-management" title="Permanent link">&para;</a></h3>
<p>In case you want to add a new dependency to StreamPipes you can use the following command:
<div class="language-bash highlight"><pre><span></span><code>poetry<span class="w"> </span>add<span class="w"> </span>&lt;dep-name&gt;
</code></pre></div></p>
<p>If the dependency is only required for development purpose or the documentation,
please stick to one the following:
<div class="language-bash highlight"><pre><span></span><code>poetry<span class="w"> </span>add<span class="w"> </span>&lt;dep-name&gt;<span class="w"> </span>--group<span class="w"> </span>dev
poetry<span class="w"> </span>add<span class="w"> </span>&lt;dep-name&gt;<span class="w"> </span>--group<span class="w"> </span>stubs
poetry<span class="w"> </span>add<span class="w"> </span>&lt;dep-name&gt;<span class="w"> </span>--group<span class="w"> </span>docs
</code></pre></div></p>
<p>In case you want to regenerate the poetry lock file, e.g., in case you manually updated the <code>pyproject.toml</code>,
the following command should be used:
<div class="language-bash highlight"><pre><span></span><code>poetry<span class="w"> </span>lock<span class="w"> </span>--no-update
</code></pre></div></p>
<p>After that, you should install the current version of the poetry lock file to keep your local environment consistent (see command above.)</p>
<h3 id="documentation">๐Ÿ“šDocumentation<a class="headerlink" href="#documentation" title="Permanent link">&para;</a></h3>
<p>To build our documentation, we use <a href="https://squidfunk.github.io/mkdocs-material/">Materials for MkDocs</a>.
All files can be found within the <code>docs</code> directory.
To pre-view your local version of the documentation, you can use the following command:
<div class="language-bash highlight"><pre><span></span><code>make<span class="w"> </span>livedoc
</code></pre></div></p>
<hr />
<h2 id="roadmap">๐Ÿš€ Roadmap<a class="headerlink" href="#roadmap" title="Permanent link">&para;</a></h2>
<p>Broadly speaking, we plan to expand or add new aspects/functionality to the library where we are focusing on the following:</p>
<ul>
<li>increase coverage of StreamPipes API ๐Ÿ”—</li>
<li>build a comprehensive function zoo ๐Ÿ˜</li>
<li>support more messaging broker ๐Ÿ“ฌ</li>
<li>possibility to build pipeline elements ๐Ÿ”ง</li>
</ul>
<p>In case you want to have a more detailed look on what we are currently planning, have a look at our <a href="https://github.com/apache/streampipes/labels/python">open issues</a>(more short-term driven).</p>
<p>Of course, contributions are always highly appreciated ๐Ÿ”ฎ</p>
<p>Stay tuned!</p>
<hr />
<h2 id="contributing">๐Ÿ‘จโ€๐Ÿ’ป Contributing<a class="headerlink" href="#contributing" title="Permanent link">&para;</a></h2>
<p><em>Before opening a pull request</em>, review the <a href="https://streampipes.apache.org/getinvolved.html">Get Involved</a> page.
It lists information that is required for contributing to StreamPipes.</p>
<p>When you contribute code, you affirm that the contribution is your original work and that you
license the work to the project under the project's open source license. Whether or not you
state this explicitly, by submitting any copyrighted material via pull request, email, or
other means you agree to license the material under the project's open source license and
warrant that you have the legal authority to do so.</p>
<hr />
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<!-- Copyright and theme information -->
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
Apache License 2.0
</div>
powered by
<a href="https://www.mkdocs.org" title="MkDocs">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/"
title="Material for MkDocs">
Material for MkDocs</a>
</div>
<div class="md-social">
<a href="https://github.com/apache/streampipes" target="_blank" rel="noopener" title="github.com" class="md-social__link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M186.1 328.7c0 20.9-10.9 55.1-36.7 55.1s-36.7-34.2-36.7-55.1 10.9-55.1 36.7-55.1 36.7 34.2 36.7 55.1zM480 278.2c0 31.9-3.2 65.7-17.5 95-37.9 76.6-142.1 74.8-216.7 74.8-75.8 0-186.2 2.7-225.6-74.8-14.6-29-20.2-63.1-20.2-95 0-41.9 13.9-81.5 41.5-113.6-5.2-15.8-7.7-32.4-7.7-48.8 0-21.5 4.9-32.3 14.6-51.8 45.3 0 74.3 9 108.8 36 29-6.9 58.8-10 88.7-10 27 0 54.2 2.9 80.4 9.2 34-26.7 63-35.2 107.8-35.2 9.8 19.5 14.6 30.3 14.6 51.8 0 16.4-2.6 32.7-7.7 48.2 27.5 32.4 39 72.3 39 114.2zm-64.3 50.5c0-43.9-26.7-82.6-73.5-82.6-18.9 0-37 3.4-56 6-14.9 2.3-29.8 3.2-45.1 3.2-15.2 0-30.1-.9-45.1-3.2-18.7-2.6-37-6-56-6-46.8 0-73.5 38.7-73.5 82.6 0 87.8 80.4 101.3 150.4 101.3h48.2c70.3 0 150.6-13.4 150.6-101.3zm-82.6-55.1c-25.8 0-36.7 34.2-36.7 55.1s10.9 55.1 36.7 55.1 36.7-34.2 36.7-55.1-10.9-55.1-36.7-55.1z"/></svg>
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.tabs", "navigation.tabs.sticky", "navigation.instant", "navigation.indexes", "navigation.tracking"], "search": "../../assets/javascripts/workers/search.dfff1995.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
<script src="../../assets/javascripts/bundle.78eede0e.min.js"></script>
</body>
</html>