<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Oleksii Borisenko</title>
    <description>The latest articles on Forem by Oleksii Borisenko (@oborys).</description>
    <link>https://forem.com/oborys</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F835725%2F530a9999-fdb0-483c-80bc-2c9484077223.png</url>
      <title>Forem: Oleksii Borisenko</title>
      <link>https://forem.com/oborys</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/oborys"/>
    <language>en</language>
    <item>
      <title>Which open-source AI models are good for urbanism tasks and smart cities?</title>
      <dc:creator>Oleksii Borisenko</dc:creator>
      <pubDate>Fri, 16 May 2025 11:19:01 +0000</pubDate>
      <link>https://forem.com/oborys/which-open-source-ai-models-are-good-for-urbanism-tasks-and-smart-cities-4gm7</link>
      <guid>https://forem.com/oborys/which-open-source-ai-models-are-good-for-urbanism-tasks-and-smart-cities-4gm7</guid>
      <description>&lt;p&gt;In this research, we tested different Large Language models on urban-related questions dataset.&lt;/p&gt;

&lt;p&gt;AI assistants and models are actively used by city dwellers to check information about city services and check routes (tourists) and by those who developed cities, such as architects, urbanists, environmental activists, politicians, and municipal government employees.&lt;/p&gt;

&lt;p&gt;Urban MCQ (Multiple-Choice Question) Benchmarks include different types of questions related to urban studies, urban design, public spaces architecture, etc.&lt;/p&gt;

&lt;p&gt;Questions related to the best urban practice were collected based on well-known research like "World Cities Report 2024", books and publicly available information.&lt;/p&gt;

&lt;p&gt;Here is how the questions look like:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How does the "network" differ from the "polynuclear field" in urban planning?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There are also questions about specific places like:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What is a key feature of the Piazza del Campo in Siena that makes it a successful public space?&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"question"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"What type of urban space fosters social interaction?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"choices"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Narrow alleys"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Pedestrian plazas"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Underground malls"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"Expressways"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"answerIndex"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find the questions dataset and LLM answers logs in &lt;a href="https://github.com/Resilient-City-Tech/urbanism-mcq-benchmark" rel="noopener noreferrer"&gt;this repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open LLMs/AI models Performance
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F486y8xy8v1xq4i1g6g98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F486y8xy8v1xq4i1g6g98.png" alt="Open LLMs/AI models Performance" width="800" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparison of multiple LLMs on 101 domain-specific questions related to planning, design, and smart cities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open source is significant for cities since it allows using related projects/models without limitations. City IT departments or contractors can deploy models on city infrastructure or in the certified cloud and are not subject to commercial limitations. In the list below, only one model published its wights under an open-source license: Mixtral 8x22B.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mixtral 8x22B&lt;/strong&gt; is developed by Mistral AI. Model weights are released under the &lt;a href="https://opensource.org/license/apache-2-0" rel="noopener noreferrer"&gt;Apache 2.0 license&lt;/a&gt;. This is a permissive license that allows users to use, modify, and distribute the model, even for commercial purposes, as long as they include the original copyright notice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Llama-4 Maverick 17B 128E&lt;/strong&gt; is part of Meta's Llama model family. Meta releases Llama models under a &lt;a href="https://www.llama.com/llama4/license/" rel="noopener noreferrer"&gt;custom license&lt;/a&gt; that is more restrictive than open-source licenses. While it allows for research and some commercial use, it prohibits specific applications and requires users to register before accessing the weights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cohere Command R+&lt;/strong&gt; uses the CC BY-NC license (Creative Commons Attribution-NonCommercial). This license allows others to use, share, and adapt the work, but only for non-commercial purposes. Commercial use requires additional licensing arrangements directly with Cohere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Google Gemma-3 27B&lt;/strong&gt; is part of Google's Gemma family of models. Google released these models under the &lt;a href="https://ai.google.dev/gemma/terms" rel="noopener noreferrer"&gt;Gemma license&lt;/a&gt;, which is based on Apache 2.0 but with additional terms. The license allows commercial use with certain restrictions, particularly around safety, illegal content, and competing products. &lt;/p&gt;

&lt;h2&gt;
  
  
  Results for proprietary models with closed AI model weight.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbbgi0lr9l1h6sughb41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbbgi0lr9l1h6sughb41.png" alt="Image description" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key Results for proprietary models:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude 3.7 Sonnet leads with highest score: 96.04%&lt;/li&gt;
&lt;li&gt;GPT-4.1 follows closely behind: 95.05%&lt;/li&gt;
&lt;li&gt;Gemini 2.0 Flash, Cohere commandA, and Mistral Large trail with scores of 90.1%, 89.11%, and 88.12% respectively&lt;/li&gt;
&lt;li&gt;All LLMs performed strongly with scores above 88%&lt;/li&gt;
&lt;li&gt;Notable performance gap (6-8%) between the top two models and the rest&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are 101 questions in this dataset, but we try to select and create different types of questions. &lt;/p&gt;

&lt;p&gt;If you are an architect, urbanist, or environmental activist working with cities or have any ideas for urban-related questions and datasets, please contribute to the project or reach out to me.&lt;/p&gt;

</description>
      <category>smartcities</category>
      <category>llm</category>
      <category>benchmarks</category>
    </item>
    <item>
      <title>How GoPro, Mercedes, Santander, and others retain open-source licenses and copyrights.</title>
      <dc:creator>Oleksii Borisenko</dc:creator>
      <pubDate>Thu, 06 Jul 2023 16:32:06 +0000</pubDate>
      <link>https://forem.com/oborys/how-gopro-mercedes-santander-and-others-retain-open-source-licenses-and-copyrights-2jg6</link>
      <guid>https://forem.com/oborys/how-gopro-mercedes-santander-and-others-retain-open-source-licenses-and-copyrights-2jg6</guid>
      <description>&lt;p&gt;One of the central claims in open-source licenses is to retain the copyright. Many proprietary software uses open-source projects, libraries, or packages. &lt;/p&gt;

&lt;p&gt;For licenses like MIT, and BSD, copyright included in license text&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7z8soyeu4by74ux90k5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7z8soyeu4by74ux90k5n.png" alt="Image description" width="800" height="189"&gt;&lt;/a&gt;&lt;br&gt;
Visual Studio Code license copyright&lt;/p&gt;

&lt;p&gt;For licenses like Apache 2.0, copyrights are included in a file named NOTICE, which you can find in the root directory of the source code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8h3aqwag8vdvfjxmvris.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8h3aqwag8vdvfjxmvris.png" alt="Image description" width="800" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/prometheus/prometheus/blob/main/NOTICE" rel="noopener noreferrer"&gt;Prometheus NOTICE&lt;/a&gt; file&lt;/p&gt;

&lt;p&gt;For Example, in license text, &lt;a href="https://opensource.org/license/mit/" rel="noopener noreferrer"&gt;MIT license&lt;/a&gt; contains the following instructions "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://opensource.org/license/apache-2-0/" rel="noopener noreferrer"&gt;Apache 2.0 license text&lt;/a&gt; contains the following requirement &lt;br&gt;
"You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works;"&lt;/p&gt;

&lt;h2&gt;
  
  
  GoPro
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnptjrut64rj4rwkehlu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnptjrut64rj4rwkehlu7.png" alt="Image description" width="800" height="683"&gt;&lt;/a&gt;&lt;br&gt;
GoPro for action cameras has a &lt;a href="https://community.gopro.com/s/article/Open-Source-Software?language=en_US" rel="noopener noreferrer"&gt;dedicated page&lt;/a&gt; where you can download archives which are open sources that are used in related camera models.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftce9p1es7vsqjfeupl2v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftce9p1es7vsqjfeupl2v.png" alt="Image description" width="800" height="795"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foha5zhp4rws768a2hod7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foha5zhp4rws768a2hod7.png" alt="Image description" width="800" height="455"&gt;&lt;/a&gt;&lt;br&gt;
List of open-source projects and packages with licenses&lt;/p&gt;

&lt;h2&gt;
  
  
  Mercedes-Benz
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf25al3qkiynk1cfjlbq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf25al3qkiynk1cfjlbq.png" alt="Image description" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mercedes-Benz AG uses Free and Open Source software in their Vehicles. To check which software is used in your vehicle, you need to paste the related VIN on &lt;a href="https://moba.i.mercedes-benz.com/bai-cars/ba/foss/content/en/licence_agreement.html" rel="noopener noreferrer"&gt;this site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fopfkth67eve08ok30w73.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fopfkth67eve08ok30w73.png" alt="Image description" width="604" height="850"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a result, you can download the pdf file with information related to the vehicle model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftl2iv17c6qukh7nmmnnn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftl2iv17c6qukh7nmmnnn.png" alt="Image description" width="800" height="739"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Santander
&lt;/h2&gt;

&lt;p&gt;The Mobile app has a separate menu item, "License", that contains license text with related copyrights notice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Floaasmsry1g7kxp5c8lh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Floaasmsry1g7kxp5c8lh.PNG" alt="Image description" width="800" height="1731"&gt;&lt;/a&gt;&lt;br&gt;
License menu item&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7e2j0nn8h56qwf0is6ks.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7e2j0nn8h56qwf0is6ks.PNG" alt="Image description" width="800" height="1731"&gt;&lt;/a&gt;&lt;br&gt;
License text and copyright&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4y9yf3er3xl6gjyms7e.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4y9yf3er3xl6gjyms7e.PNG" alt="Image description" width="800" height="1731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cisco
&lt;/h2&gt;

&lt;p&gt;Cisco AnyConnect Desktop client contains license copyright information related &lt;a href="https://github.com/pocoproject/openssl/blob/develop/LICENSE" rel="noopener noreferrer"&gt;OpenSSL Toolkit&lt;/a&gt; and &lt;a href="https://github.com/curl/curl/blob/master/COPYING" rel="noopener noreferrer"&gt;libcurl HTTP library&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fopwoxzlguyec684q6uj7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fopwoxzlguyec684q6uj7.png" alt="Image description" width="800" height="515"&gt;&lt;/a&gt;&lt;br&gt;
AnyConnect dialog window&lt;/p&gt;

&lt;p&gt;Share your findings on how the companies you know retain open-source licenses and copyrights in the comments.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>licenses</category>
    </item>
    <item>
      <title>How I use GitHub Codespaces for prototyping and demos. Instructions.</title>
      <dc:creator>Oleksii Borisenko</dc:creator>
      <pubDate>Fri, 03 Mar 2023 13:00:44 +0000</pubDate>
      <link>https://forem.com/oborys/how-i-use-github-codespaces-for-prototyping-and-demos-instructions-4ml7</link>
      <guid>https://forem.com/oborys/how-i-use-github-codespaces-for-prototyping-and-demos-instructions-4ml7</guid>
      <description>&lt;p&gt;&lt;a href="https://docs.github.com/en/codespaces" rel="noopener noreferrer"&gt;GitHub Codespaces&lt;/a&gt; is an interactive developer environment in GitHub cloud, aka Cloud IDE, that uses VS Code and different types of containers to run User's code and expose internal ports using public URLs if needed.&lt;br&gt;
I don't even remember when I used ngrok last time. Codespaces has all the needed features for my projects. You can work in codespaces with your private and public repo and other public open-source projects on GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45gk5hq93b5bah39wemy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45gk5hq93b5bah39wemy.png" alt="GitHub Codespaces" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I've enjoyed in GitHub Codespaces:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Work, run and deploy your apps from any device and location&lt;/li&gt;
&lt;li&gt;Each developer who has a GitHub account can easily fork and run your repo following instructions&lt;/li&gt;
&lt;li&gt;Expose internal IP addresses and resources&lt;/li&gt;
&lt;li&gt;Adjust and test Interaction using Webhooks or API server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CodeSpaces will be deleted after some time of inactivity. The default and maximum parameter is 30 days&lt;/li&gt;
&lt;li&gt;Consequently User can lose the changes if you forget to push it to a related git branch &lt;/li&gt;
&lt;li&gt;Developer needs to describe how to paste and manage credentials and sensitive data in Codespaces &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;List all of your Codespaces you can see on the following page &lt;a href="https://github.com/codespaces" rel="noopener noreferrer"&gt;https://github.com/codespaces&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  Containers in Codespaces
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57etb0j7ldum2e5muoyj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57etb0j7ldum2e5muoyj.png" alt="Create codespace on main" width="800" height="705"&gt;&lt;/a&gt;&lt;br&gt;
What happens when the User opens a repository in Codespaces by clicking "Create codespace on main":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Default Linux Universal container is deployed&lt;/li&gt;
&lt;li&gt;All repository source code and other files uploaded to the new Codespace &lt;/li&gt;
&lt;li&gt;Cloud VS Code will be available through the users browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Default Linux Universal supports the following programming languages: Python, Node.js, JavaScript, TypeScript, C++, Java, C#, F#, .NET Core, PHP, Go, Ruby, and Conda.&lt;/p&gt;

&lt;p&gt;The following customization is available:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customize your container&lt;/li&gt;
&lt;li&gt;Open related file(s) in Codespace&lt;/li&gt;
&lt;li&gt;Provide post-create a terminal command that will run automatically&lt;/li&gt;
&lt;li&gt;Port Forwarding instructions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All these instructions should be described in the &lt;code&gt;.devcontainer/devcontainer.json&lt;/code&gt; file. The &lt;code&gt;.devcontainer&lt;/code&gt; folder should be stored in the root directory of your repo&lt;/p&gt;

&lt;p&gt;You can configure the dev container for a repository so that codespaces created for that repository give you a tailored development environment, complete with all the tools and runtimes you need to work on a specific project. Suppose you don't define a configuration in the repository. In that case, GitHub Codespaces uses a default configuration, which contains many of the standard tools that your team might need to develop your project.&lt;/p&gt;

&lt;p&gt;The following examples use a universal container with 4 CPUs, and after deploying the container in Codespace, we open &lt;code&gt;README.md&lt;/code&gt; and &lt;code&gt;index.js&lt;/code&gt; files, run the &lt;code&gt;npm start&lt;/code&gt; command, and Expose an internal 3000 port with a public URL (like https://${CODESPACE_NAME}-3000.preview.app.github.dev/)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"image"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"mcr.microsoft.com/devcontainers/universal:2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"hostRequirements"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"cpus"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"waitFor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"onCreateCommand"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"updateContentCommand"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm install"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"postCreateCommand"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"  "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"postAttachCommand"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"server"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm start"&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"customizations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"codespaces"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"openFiles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="s2"&gt;"README.md"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="s2"&gt;"index.js"&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"portsAttributes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"3000"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Application"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"onAutoForward"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"openPreview"&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"forwardPorts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Codespace environment variables
&lt;/h2&gt;

&lt;p&gt;There are a few Codespace environment variables that are helpful for the topic of this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CODESPACE_NAME&lt;/code&gt; - The name of the Codespace For example, &lt;code&gt;octocat-literate-space-parakeet-mld5&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN&lt;/code&gt; - Returns the domain of the GitHub Codespaces forwarded port. Usually, &lt;code&gt;preview.app.github.dev&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We have a few ways how we can use and store static public URL&lt;br&gt;
Print URL in the terminal and copy and paste it into a related .env file or into the source code &lt;/p&gt;

&lt;p&gt;The following examples help construct external URLs for the Node.js and Python Flask App.&lt;/p&gt;

&lt;p&gt;The app is running on port 3000&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`App listening on port &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you need to get the URL for the webhooks event.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"https://&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CODESPACE_NAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-3000.preview.app.github.dev/webhooks/event"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if you set the env variable as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Than, we can construct this URL by the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"https://&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CODESPACE_NAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PORT&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/webhooks/event"&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdy5qv4sdqywixx9pgtt2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdy5qv4sdqywixx9pgtt2.png" alt="codespace url" width="800" height="88"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following code snippet deploys Flask App on port 8080&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;localhost&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8080&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's run this command to the URL for the Flask App&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"https://&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CODESPACE_NAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-8080.preview.app.github.dev/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default Codespace port is private.&lt;br&gt;
So in the terminal, open the Port tab. Click on &lt;code&gt;Private&lt;/code&gt; in the &lt;code&gt;Visibility&lt;/code&gt; column, and change it to &lt;code&gt;Public&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnenzjgeoqyk28srscivm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnenzjgeoqyk28srscivm.png" alt="Codespace port" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Share your tips for using Codespaces in the comments.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>github</category>
    </item>
    <item>
      <title>API Product Managers vs. API Developers</title>
      <dc:creator>Oleksii Borisenko</dc:creator>
      <pubDate>Thu, 01 Dec 2022 23:12:32 +0000</pubDate>
      <link>https://forem.com/oborys/api-product-managers-vs-api-developers-4465</link>
      <guid>https://forem.com/oborys/api-product-managers-vs-api-developers-4465</guid>
      <description>&lt;p&gt;Terminology that will be used in the article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API Consumer - end user(s) interacting with an API&lt;/li&gt;
&lt;li&gt;API Resource - an entity that has a URI where it can be manipulated through HTTP requests. Defined by the endpoint + path, e.g. &lt;a href="https://API-SERVER/v1/book" rel="noopener noreferrer"&gt;https://API-SERVER/v1/book&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;API Operation - a combination of a resource and HTTP method, e.g., GET &lt;a href="https://API-SERVER/v1/book/1" rel="noopener noreferrer"&gt;https://API-SERVER/v1/book/1&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;API Product managers are usually responsible for the following:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Defining the technical and business details of API (API contract) &lt;/li&gt;
&lt;li&gt;API strategy, follow and know the API lifecycle, and bring the necessary reliability, observability, and governance to your operations.&lt;/li&gt;
&lt;li&gt;Responsible for the creation initial OAS document&lt;/li&gt;
&lt;li&gt;Defining API roadmap&lt;/li&gt;
&lt;li&gt;Managing feature requests&lt;/li&gt;
&lt;li&gt;Organizing EFT &amp;amp; GA releases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;API developers and architects are usually responsible for the following:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Organizing the API implementation&lt;/li&gt;
&lt;li&gt;Refining the API design&lt;/li&gt;
&lt;li&gt;Reviewing updates of the API contract&lt;/li&gt;
&lt;li&gt;Following security standards&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What instrument does the API product manager have.
&lt;/h2&gt;

&lt;p&gt;First, if you are a product manager for API, you should understand that your API Consumers/clients are developers and businesses, of Course. &lt;/p&gt;

&lt;p&gt;Important tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Conjoint Analysis&lt;/li&gt;
&lt;li&gt;Interview&lt;/li&gt;
&lt;li&gt;Analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.apimatic.io/" rel="noopener noreferrer"&gt;Apimatic&lt;/a&gt; complete set of DX components such as autogenerated SDKs, API portal, API docs, live code samples&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/masteringapi/rest-api-standards" rel="noopener noreferrer"&gt;An Open List of REST API Standards&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;API development tool: &lt;a href="https://www.postman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt;, &lt;a href="https://github.com/eolinker/eoapi" rel="noopener noreferrer"&gt;Eoapi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whether you work with an open-source product or a big enterprise solution, be sure you can find internal/external (or northbound/southbound) API to interact with specific solutions. As for now, 90% of developers use external APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What instruments do API developers and API architects have.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/OpenAPITools/openapi-generator" rel="noopener noreferrer"&gt;OpenAPI Generator&lt;/a&gt; allows the generation of API client libraries (SDK generation), server stubs, documentation, and configuration automatically given an OpenAPI Spec (v2, v3)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cisco-developer/api-insights" rel="noopener noreferrer"&gt;API Insights&lt;/a&gt; - manage versioned API specifications (Swagger 2.0/OpenAPI Spec 3.x) for services. It also does static analysis of API spec files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://raml.org" rel="noopener noreferrer"&gt;RESTful API Modeling Language (RAML)&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://jsoncrack.com/editor" rel="noopener noreferrer"&gt;JSON visualizer&lt;/a&gt; &lt;br&gt;
&lt;a href="https://jsonlint.com/" rel="noopener noreferrer"&gt;JSON validator&lt;/a&gt;&lt;br&gt;
&lt;a href="https://codebeautify.org/yaml-validator/" rel="noopener noreferrer"&gt;YAML validator&lt;/a&gt; &lt;br&gt;
&lt;a href="https://stoplight.io/" rel="noopener noreferrer"&gt;Collaborative Design &amp;amp; Documentation for APIs&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/blst-security/cherrybomb" rel="noopener noreferrer"&gt;Cherrybomb&lt;/a&gt; is a CLI tool that helps you avoid undefined user behavior by auditing your API specifications, validating them, and running API security tests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://apisecurity.io/tools/audit/" rel="noopener noreferrer"&gt;API development tool&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.workato.com/platform#enterprise_workflow_automation" rel="noopener noreferrer"&gt;Workato API Platform&lt;/a&gt; &lt;br&gt;
&lt;a href="https://www.mulesoft.com/" rel="noopener noreferrer"&gt;MuleSoft&lt;/a&gt;- API management, monitoring.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ghuwtpqtj0acky80p0o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ghuwtpqtj0acky80p0o.png" alt="Image description" width="800" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Biggest cloud provider has their solutions and tools for API:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/apigee" rel="noopener noreferrer"&gt;Apigee API Management&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aws.amazon.com/api-gateway/" rel="noopener noreferrer"&gt;Amazon API Gateway&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://azure.microsoft.com/en-us/products/api-management/" rel="noopener noreferrer"&gt;Azure API Management&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;URI, Status codes&lt;/strong&gt;&lt;br&gt;
Refer to the API design; your dev team should manage the status codes.&lt;br&gt;
The product manager should define what useful information can be added besides the HTTP Status Messages Description that can be extended by API PM (HTTP/1.1 406 Not Acceptable). &lt;br&gt;
REST API URI suggestions:&lt;br&gt;
Use a dash to improve the readability &lt;br&gt;
The lowercase letter is a good choice &lt;br&gt;
Avoid odd pluralization (network/networks image/images)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API limitation&lt;/strong&gt;&lt;br&gt;
API or API QPS (Queries per second) can be limited by the number of API calls. Or after API Consumer buys the product and purchases a subscription, the API Consumer should not pay extra and can use this API without API operation limitation. API product managers need to define the difference between freemium and Pro/paid API versions for other products.&lt;br&gt;
In limitation, we expect that Business models will be defined with the customer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer support&lt;/strong&gt; &lt;br&gt;
As for me, it is a must to have. First, it helps your API Consumer solve problems connected with the API and services you provide. Second, this also gives you valuable data to analyze what you can improve and which service capabilities you can enhance or retire old APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer documentation&lt;/strong&gt;&lt;br&gt;
Part of the project that needs to be delivered. Auto-generated docs sometimes need to be clarified and fully documented. API PM, developers, and tech writers must add operation descriptions, input/output parameters, and structure for all success and failure responses. Your API will be used using various SDK programming languages. At the familiarization and testing stage, the API Consumer will use specific API operations to solve the problem. Therefore, it is essential to write clear documentation, and besides that, the URI can tell a lot about what the API method does precisely. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code samples and learning materials&lt;/strong&gt;&lt;br&gt;
These resources are essential for the API Consumer to quickly prototype and bootstrap projects and learn how to utilize your API. Besides, it's good to have learning materials and tutorials to help educate API users. Finally, furnish samples of queries and replies to enhance the understanding and usability for developers.&lt;br&gt;
Need to be detected and defined by API PM and developers&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tests environments&lt;/strong&gt;&lt;br&gt;
Need to be defined by API PM, detect minimum resources and scope required by the clients. And then, the Product manager monitors usage and issues connected with the test environment, collecting data to add new features to the test env. &lt;br&gt;
API Developer design and deploy test env, maintain tech environment, and upgrade related hardware and software&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changelog&lt;/strong&gt;&lt;br&gt;
All changes need to be tracked and available for the changes. If you have different versions and migrate from one to another /v0 to /v1, you need to give us time for our customer to change it. I saw different samples when this transfer period was six months and up to 1 year.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Of Course, product and dev teams need to work closely with each other to create the best products. From the users and business side, developers and product managers are on one side of the wall, so no matter if you are an API developer or API, Product manager. Your main goal is to do your best, collaborate and deliver the best product. &lt;/p&gt;

</description>
      <category>api</category>
      <category>tooling</category>
      <category>management</category>
    </item>
    <item>
      <title>Unpacking new OpenAI image generation API (+ Postman collection)</title>
      <dc:creator>Oleksii Borisenko</dc:creator>
      <pubDate>Wed, 09 Nov 2022 17:59:02 +0000</pubDate>
      <link>https://forem.com/oborys/unpacking-new-openai-image-generation-api-postman-collection-4ggk</link>
      <guid>https://forem.com/oborys/unpacking-new-openai-image-generation-api-postman-collection-4ggk</guid>
      <description>&lt;p&gt;OpenAI &lt;a href="https://beta.openai.com/docs/guides/images/introduction" rel="noopener noreferrer"&gt;release new image generation&lt;/a&gt; capabilities with  DALL·E models.&lt;br&gt;
All images (except compilated and screenshots) in this post were generated using OpenAI image generation API. &lt;br&gt;
According to &lt;strong&gt;Your Content&lt;/strong&gt; &lt;a href="https://openai.com/api/policies/terms/" rel="noopener noreferrer"&gt;Terms of Use&lt;/a&gt; chapter: "OpenAI hereby assigns to you all its right, title and interest in and to Output."&lt;/p&gt;

&lt;p&gt;New users can use credit for $18 (Free trial usage). With this credit, you can &lt;strong&gt;create or edit 900 images 1024x1024&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  API key
&lt;/h3&gt;

&lt;p&gt;First, after registering and confirming your phone number, you need to &lt;a href="https://beta.openai.com/account/api-keys" rel="noopener noreferrer"&gt;Generate your API key&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this API key, we can move forward.&lt;/p&gt;
&lt;h3&gt;
  
  
  OpenAI API images Postman collection
&lt;/h3&gt;

&lt;p&gt;I've created &lt;a href="https://documenter.getpostman.com/view/2236597/2s8YehTcFr" rel="noopener noreferrer"&gt;OpenAI API images Postman collection&lt;/a&gt; that users can play with. You can open this collection and go through the steps below.&lt;/p&gt;
&lt;h3&gt;
  
  
  Let's begin with generating the image
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ejux7vw0xxxaec7uad5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ejux7vw0xxxaec7uad5.png" alt="Image description" width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Postman, when API opaeration body contain &lt;code&gt;response_format="b64_json"&lt;/code&gt; we will receive base64 image string&lt;/p&gt;

&lt;p&gt;POST API operation with body&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "prompt": "RESTfull API security",
    "n": 1,
    "size": "1024x1024",
    "response_format": "b64_json"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We received the following response.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "created": 1667860720,
    "data": [
        {
            "b64_json": "iVBORw0KGgoAAA  ...."
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then, we need to convert the base64 string into the image.&lt;/p&gt;

&lt;p&gt;For this, let's use the following Postman Test script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;responseBody&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;base64ImgData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`data:image/png;base64, `&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;b64_json&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;template&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`
&amp;lt;img src="{{img}}"&amp;gt;
`&lt;/span&gt;

&lt;span class="nx"&gt;pm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;visualizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;img&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;base64ImgData&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In base64ImgData, I've also concatenated &lt;code&gt;data:image/png;base64,&lt;/code&gt; string with b64_json encode string for the correct output in Postman.&lt;/p&gt;

&lt;p&gt;And then clicking on the &lt;code&gt;Visualize&lt;/code&gt; tab, we can see our generated image.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create image edit
&lt;/h3&gt;

&lt;p&gt;Here inputs images and the results. Prompt: &lt;code&gt;DS-1 Death Star in the sky&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z65auneo2826oa7qgdz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z65auneo2826oa7qgdz.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For creating your own mask, you can use a free online editor &lt;a href="https://www.photopea.com/" rel="noopener noreferrer"&gt;https://www.photopea.com/&lt;/a&gt; or for the background removing &lt;a href="https://www.remove.bg/" rel="noopener noreferrer"&gt;https://www.remove.bg/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python function to edit image:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;imageEditB64&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;promptText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;numberOfImages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;imgSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;uploadedImgPath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maskImgPath&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;


    &lt;span class="n"&gt;response&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_edit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uploadedImgPath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;mask&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maskImgPath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;promptText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;numberOfImages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;imgSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;response_format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;b64_json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;image_64_encode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;))[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;b64_json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;image_64_decode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;base64&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;b64decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image_64_encode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;fileName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;promptText&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;_&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;.png&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;image_result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;wb&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# create a writable image and write the decoding result
&lt;/span&gt;    &lt;span class="n"&gt;image_result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image_64_decode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;imageEditB64&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DS-1 Death Star in the sky&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1024x1024&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kolochava-ukraine-1024.png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kolochava-ukraine-1024-mask.png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result of using the OpenAI library was &lt;strong&gt;OpenAIObject&lt;/strong&gt;, so we need to convert it to a string for parsing and next image decoding.&lt;/p&gt;

&lt;p&gt;Also, you can check simple Python source code &lt;a href="https://github.com/oborys/OpenAI-image-generation-API-script-and-Postman-collection/blob/main/openai_image_api_simple_functions.py" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create image variation
&lt;/h3&gt;

&lt;p&gt;To add a related image needed for an API request in Postman, click the 'Body' tab, and then in the 'VALUE' column, push the 'Select Files' button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F74he19t83sgremy83f2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F74he19t83sgremy83f2s.png" alt="Image description" width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Regarding API response time* (using my Postman collection)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image generations for size 1024x1024 take 6s-8s&lt;/li&gt;
&lt;li&gt;Create image edit for size 1024x1024, takes 15s-17s&lt;/li&gt;
&lt;li&gt;Create image variations for size 1024x1024, takes 12s-14s&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;for prompts with 10-195 characters&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;During my work, I received diferent HTTP error codes, and the response description is excellent and informative.&lt;/p&gt;

&lt;p&gt;Missing image&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;400 Bad request
{
    "error": {
        "code": null,
        "message": "'image' is a required property",
        "param": null,
        "type": "invalid_request_error"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case if uploaded image size is not one of 256x256, 512x512, or 1024x1024:&lt;br&gt;
401 Unauthorised&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "error": {
        "code": null,
        "message": "Uploaded image must be a PNG and less than 4 MB.",
        "param": null,
        "type": "invalid_request_error"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;401 Unauthorised&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "error": {
        "code": null,
        "message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accesing the API from your browser and are prompted for a username and password. You can obtain an API key from https://beta.openai.com.",
        "param": null,
        "type": "invalid_request_error"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case the API key is wrong.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "error": {
        "code": "invalid_api_key",
        "message": "Incorrect API key provided: sk-***********************. You can find your API key at https://beta.openai.com.",
        "param": null,
        "type": "invalid_request_error"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But returning the wrong API key in response is not a good idea from a security perspective. For example, imagine that we print API errors in the console or the GUI of our APP with information about errors, and an external audience can see this. &lt;/p&gt;

&lt;p&gt;If you have a problem with limits, you will get the next response&lt;br&gt;
400 Bad request&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "error": {
        "code": "billing_hard_limit_reached",
        "message": "Billing hard limit has been reached",
        "param": null,
        "type": "invalid_request_error"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>api</category>
      <category>openai</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Complete guide to open source licenses for developers. Friendly licenses for proprietary software</title>
      <dc:creator>Oleksii Borisenko</dc:creator>
      <pubDate>Thu, 08 Sep 2022 10:42:50 +0000</pubDate>
      <link>https://forem.com/oborys/complete-guide-to-open-source-licenses-for-developers-3j5e</link>
      <guid>https://forem.com/oborys/complete-guide-to-open-source-licenses-for-developers-3j5e</guid>
      <description>&lt;ul&gt;
&lt;li&gt;
Introduction

&lt;ul&gt;
&lt;li&gt;Disclaimer&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Open source licenses&lt;/li&gt;

&lt;li&gt;

About popular licenses

&lt;ul&gt;
&lt;li&gt;GNU General Public License&lt;/li&gt;
&lt;li&gt;Apache&lt;/li&gt;
&lt;li&gt;MIT&lt;/li&gt;
&lt;li&gt;BSD&lt;/li&gt;
&lt;li&gt;Creative Commons&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Other interesting licenses&lt;/li&gt;

&lt;li&gt;What about unlicensed projects?&lt;/li&gt;

&lt;li&gt;Compatibility of licenses&lt;/li&gt;

&lt;li&gt;

Multi-licensing

&lt;ul&gt;
&lt;li&gt;How to correctly add multiple licenses to your GitHub project?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

About changing the license

&lt;ul&gt;
&lt;li&gt;Contributor License Agreement (CLA)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Open source policies in commercial companies&lt;/li&gt;

&lt;li&gt;Friendly licenses for proprietary software&lt;/li&gt;

&lt;li&gt;Interesting legal cases&lt;/li&gt;

&lt;li&gt;Using license templates (GitHub, GitLab)&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Developers do not often pay attention to licenses when using various open-source projects. We can often use projects*/part of a project or functions for our applications and programs without thinking about how it might affect the future. Do you need to keep copyright? What are the requirements and obligations of different licenses? In this article, I want to highlight the issue of choosing licenses for the project and the specifics of using projects with different types of licenses. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;*Here and below, the project refers to an open-source project or repository.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At Cisco, I have been developing two platforms for code exchange. &lt;a href="https://developer.cisco.com/codeexchange/" rel="noopener noreferrer"&gt;Code Exchange&lt;/a&gt; and &lt;a href="https://developer.cisco.com/network-automation/" rel="noopener noreferrer"&gt;Automation Exchange&lt;/a&gt; are aggregators of open-source projects. We have requirements for the availability of licenses, for the availability of copyrights, etc. Below I will share information about licenses and their use for commercial projects/proprietary software.&lt;/p&gt;

&lt;h3&gt;
  
  
  Disclaimer:
&lt;/h3&gt;

&lt;p&gt;Information in this guide should not be considered legal advice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open source licenses
&lt;/h2&gt;

&lt;p&gt;A license for open source projects is a legal contract that regulates the relationship between the author(s) and the user, which describes the terms of use of the project/code, including in commercial programs. The license defines what can and cannot be done with the software components, the obligations, and the features of use. Also, the license regulates the responsibility of the authors and contributors to the project. Courts of different countries have ruled that an open-source license is an enforceable contract.&lt;/p&gt;

&lt;p&gt;In licenses, pragmatism and free software ideology often fight. When we hear open source, we may think that it is possible to use/modify projects without problems. Still, as mentioned above, each license imposes certain obligations from the moment of use, at least - to keep the copyright. Specific licenses may require you to publish the source code of the entire project in which the code was used, for example, when using a project under the GPL license.&lt;/p&gt;

&lt;p&gt;Licenses can be divided into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copyleft (GNU GPL, Microsoft Public License),&lt;/li&gt;
&lt;li&gt;Permissive (Apache, MIT, BSD).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Copyleft can also be divided into &lt;strong&gt;“weak”&lt;/strong&gt; and &lt;strong&gt;“strong”&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"strong"&lt;/strong&gt; include GNU, GNU Affero General Public License&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"weak"&lt;/strong&gt; - for example, Eclipse, GNU Lesser General Public License (LGPL).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For weak Copyleft licenses, it is permissible to compile different binary files and release the result with a different type of license, or not to change the license of the source project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzi22n441s49u7t07bz1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzi22n441s49u7t07bz1.png" alt="Image description" width="538" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what the Top licenses looked like in 2021. Data: MEND open source research&lt;/p&gt;

&lt;p&gt;But what is the difference, for example, between different copyleft or permissive licenses?&lt;/p&gt;

&lt;p&gt;For this, it is necessary to dive deep into the license text and look for differences there, as well as in legal cases and judicial practice. Also, unfortunately, the speed of reading licenses can be equal to the rate of reading the user agreement.&lt;/p&gt;

&lt;p&gt;In this regard, infographics like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fys0ru27i4z30m8yygma7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fys0ru27i4z30m8yygma7.png" alt="Image description" width="800" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Generally, it is common practice to recommend a license for use (except superseded ones) from the &lt;a href="https://opensource.org/licenses/alphabetical" rel="noopener noreferrer"&gt;Open Source Initiative (OSI)&lt;/a&gt; list. There is a separate term - &lt;strong&gt;Source-available&lt;/strong&gt; for projects that are distributed with licenses, not from the OSI list.&lt;/p&gt;

&lt;h2&gt;
  
  
  About popular licenses
&lt;/h2&gt;

&lt;h3&gt;
  
  
  GNU General Public License
&lt;/h3&gt;

&lt;p&gt;The GPL is generally considered an "aggressive" license, which sometimes is incompatible with other copyleft licenses. &lt;br&gt;
In addition, this license is often called viral license because they are transferred from project to project.&lt;/p&gt;

&lt;p&gt;If you use GPL-licensed projects in your software, then all your software is considered a "work based on" the GPL. Copyright and patent usage rights are unregulated. Who then monitors that GPL projects remain copyleft? Various associations and unions do this, but in addition, individual contributors and free software evangelists (&lt;a href="https://wiki.fsfe.org/Migrated/GPL%20Enforcement%20Cases" rel="noopener noreferrer"&gt;Harald Welte&lt;/a&gt;) also act as plaintiffs in cases of violation of the license agreement. Besides Free Software Foundation (FSF) - this organization owns the rights to parts of the GNU systems project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exceptions to the GNU Lesser General Public License&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Until 1999, the license was called the GNU Library General Public License. GNU LGPL was created not to violate the principles of free software so that developers can use this license for their libraries and scripts. In addition, other developers and companies can use the relevant projects with the LGPL license without affecting the license of the main/compiled project, derivative work (including commercial ones).&lt;/p&gt;

&lt;p&gt;Projects using the GNU GPL: &lt;a href="https://github.com/torvalds/linux" rel="noopener noreferrer"&gt;Linux Kernel&lt;/a&gt;, WordPress (GNU GPL-2.0), Solidity, the Smart Contract Programming Language (GNU GPL v3.0), &lt;a href="https://github.com/grafana/grafana" rel="noopener noreferrer"&gt;Grafana&lt;/a&gt; (GNU Affero General Public License v3.0), FFmpeg (GNU Lesser General Public License (LGPL) version 2.1), &lt;a href="https://github.com/signalapp/Signal-Server" rel="noopener noreferrer"&gt;Signal&lt;/a&gt; (GNU Affero General Public License v3.0)&lt;/p&gt;

&lt;h3&gt;
  
  
  Apache
&lt;/h3&gt;

&lt;p&gt;Unlike other permissive licenses, it has clause 3 (3. Grant of Patent License.), which refers to patents. The Clause governs the disposal of patents: participants grant permission to use any of their patents that may relate to their contribution.&lt;/p&gt;

&lt;p&gt;Also, if you have modified parts of the files/code, you can apply for a new license. And indicate all the files that have been changed.&lt;/p&gt;

&lt;p&gt;The difference between Apache 1.0 and Apache 1.1, Apache 2.0 licenses is that version 1.0 removed the requirement that all promotional materials of the project should contain the message "This product includes software developed by the Apache Group* for use in the Apache HTTP server project (&lt;a href="http://www.apache.org/)" rel="noopener noreferrer"&gt;http://www.apache.org/)&lt;/a&gt;." In later versions, it is enough to simply place the license in the root of your repository.&lt;/p&gt;

&lt;p&gt;Also, you can release/publish a modified version of the project (which was under the Apache license) under a different license, excluding those files that were not modified.&lt;/p&gt;

&lt;p&gt;The popularity of this license is constantly growing, not least because this type of license has been chosen as mandatory for &lt;a href="https://github.com/cncf/foundation/blob/main/charter.md#11-ip-policy" rel="noopener noreferrer"&gt;projects by the Cloud Native Computing Foundation.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Projects using Apache 2.0:&lt;/strong&gt; Kubernetes, Selenium, TensorFlow&lt;/p&gt;

&lt;h3&gt;
  
  
  MIT
&lt;/h3&gt;

&lt;p&gt;The license allows you to do whatever you want with the code; the only requirement is keeping the original license and attribution information. If choosing between permissive licenses for your project, I would choose and recommend MIT.&lt;/p&gt;

&lt;p&gt;In short, it is straightforward, does not require additional NOTICE files, and you can use copyrights of any organization and trademark.&lt;/p&gt;

&lt;p&gt;There are projects and resources that &lt;strong&gt;automatically apply the specific license&lt;/strong&gt; to code/content that you created using related project&lt;br&gt;
For example: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ISC License is the default license used when setting up a new npm package with the npm init command. 
&amp;gt; &lt;a href="https://choosealicense.com/licenses/isc/" rel="noopener noreferrer"&gt;The ISC License&lt;/a&gt; (ISC) is functionally identical to the MIT License, but with some wording deemed unnecessary removed.&lt;/li&gt;
&lt;li&gt;CodePen's are &lt;a href="https://blog.codepen.io/documentation/licensing/" rel="noopener noreferrer"&gt;automatically MIT licensed&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Projects using MIT:&lt;/strong&gt; Visual Studio Code, Julia Language, Electron, Angular.js, Rails&lt;/p&gt;

&lt;h3&gt;
  
  
  BSD
&lt;/h3&gt;

&lt;p&gt;BSD (Berkeley Source Distribution). Permissive open source license that retains license and copyright notices. The license allows the distribution of more significant or licensed works without source code and under other license terms. The 2-Clause BSD License is very similar to the MIT License.&lt;/p&gt;

&lt;p&gt;The modified 3-Clause BSD version protects you/the contributor from having your name used in the project if you don't want it, thanks to the unsupported posting.&lt;/p&gt;

&lt;p&gt;Also, there is a license &lt;a href="https://opensource.org/licenses/BSDplusPatent" rel="noopener noreferrer"&gt;BSD+Patent&lt;/a&gt; that regulates patent issues. And each copyright holder and contributor with this grants an irrevocable patent license. But, good news for patent owners - "The patent license shall not apply to any other combinations which include the Contribution."&lt;/p&gt;

&lt;p&gt;Some code of BSD projects distributed under BSD or similar licenses is used in commercial Windows, macOS, and iOS software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Projects running BSD:&lt;/strong&gt; Flutter, libssh2&lt;/p&gt;

&lt;h3&gt;
  
  
  Creative Commons
&lt;/h3&gt;

&lt;p&gt;The license allows users to distribute and copy the author's works.&lt;br&gt;
For StackOverflow users, it will be interesting to know that according to the &lt;a href="https://stackoverflow.com/legal/terms-of-service/public#licensing" rel="noopener noreferrer"&gt;Terms of Service&lt;/a&gt;, all content created on the platform (including questions and answers) is licensed under Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).&lt;br&gt;
License is also used on the YouTube platform for &lt;a href="https://support.google.com/youtube/answer/2797468?hl=en" rel="noopener noreferrer"&gt;video creators&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other interesting licenses
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://spdx.org/licenses/WTFPL.html" rel="noopener noreferrer"&gt;Do What The F*ck You Want To Public License&lt;/a&gt; - no comments here, in fact the license can be classified as permissive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Government License — Canada&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Canadian government license for open source. According to &lt;a href="https://open.canada.ca/en/open-government-licence-canada" rel="noopener noreferrer"&gt;the text&lt;/a&gt;, the license can be classified as permissive. However, as noted in the &lt;a href="https://github.com/canada-ca/open-source-logiciel-libre/blob/master/LICENSE.md" rel="noopener noreferrer"&gt;License text&lt;/a&gt;, the license is also subject to "Crown Copyright".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Business Source License 1.1&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;License from MariaDB Corporation, which develops the relational database project of the same name. The license is attractive in that it limits the project's use only in a non-production project (non-production use of the Licensed Work).&lt;/p&gt;

&lt;p&gt;Restrictions are set for four years. And the term is calculated from the change date or the fourth anniversary of the first public distribution of a specific version of the project, whichever comes first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about unlicensed projects?
&lt;/h2&gt;

&lt;p&gt;If the project is published without a license, it does not mean that it can be used.&lt;/p&gt;

&lt;p&gt;By default, the software is protected by exclusive copyright, and without a license, use is illegal, even if the project is published. Only the license grants permission to use, copy, distribute, or modify the software without risk of infringement if the terms are met.&lt;/p&gt;

&lt;p&gt;In particular, we cannot accept and publish projects without a license on our project exchange platforms. Most organizations and companies also do not publish their projects without licenses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compatibility of licenses
&lt;/h2&gt;

&lt;p&gt;Each application or program usually involves many different libraries, and projects, each of which has its license with its own set of conditions. So how can you ensure that all the licenses you use are compatible and compliant?&lt;/p&gt;

&lt;p&gt;Black Duck Audit Services &lt;a href="https://www.synopsys.com/content/dam/synopsys/sig-assets/reports/rep-ossra-2022.pdf" rel="noopener noreferrer"&gt;found&lt;/a&gt; that 53% of audited codebases in 2021 contained open source code with conflicting licenses. 20% had open source projects without licenses or custom licenses. In general, 97% of commercial code contains various parts and open source projects. Most licenses protect and insure authors from possible lawsuits or damages that may be caused during the use of open source components and projects in commercial products.&lt;/p&gt;

&lt;p&gt;Next, I will list some examples of license compatibility/incompatibility.&lt;/p&gt;

&lt;p&gt;The Ms-PL license is attractive because it does not oblige you to publish the source code. However, the license also obliges you to retain all copyright, patent, trademark, and attribution notice originally present in the software.&lt;/p&gt;

&lt;p&gt;Microsoft Public License (Ms-PL) and Microsoft Reciprocal License (Ms-RL) compatibility. The difference between them is that Ms-RL is a copyleft, so you can modify and use the files as long as you keep the source code under the Ms-RL license. Interestingly, most projects are now distributed under the MIT and Apache-2.0 licenses.&lt;/p&gt;

&lt;p&gt;Ms-PL is not compatible with the GNU GPL. (Ms-PL clause enables compiling the program without distributing the source code.)&lt;/p&gt;

&lt;p&gt;2-clause BSD and 3-clause BSD are compatible with the GNU GPL.&lt;/p&gt;

&lt;p&gt;The Apache 2.0 license is compatible with the GPLv3, provided, of course, that the final software is to be released under the GPLv3.&lt;/p&gt;

&lt;p&gt;However, Apache 2.0 is incompatible with GPLv2 because a restriction stops the release of a patented work if a court has found a patent infringing (Clause 7 of the &lt;a href="https://opensource.org/licenses/GPL-2.0" rel="noopener noreferrer"&gt;GNU GPL-2.0&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The following diagram shows an example of compatible licenses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3lzkrir44374nx3imtee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3lzkrir44374nx3imtee.png" alt="Image description" width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the licenses are compatible, there is an arrow between them. The direction of the arrow indicates the more substantial license. A substantial, strong, inclusive license is a license that essentially includes all the key terms of another license.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-licensing
&lt;/h2&gt;

&lt;p&gt;Some projects are released and published under two or more licenses. Often, multi-licensing in a project involves using both copyleft and proprietary licenses. This principle gives users and organizations more freedom in using the project or code.&lt;/p&gt;

&lt;p&gt;Supporters of the free distribution of code and programs can, for example, leave the GPL license. Proprietary licenses can be used by developers who want to monetize their products or use the project in commercial solutions with patenting and without publishing the code. In addition, several licenses allow you and users to use one of the corresponding licenses. This avoids conflict of licenses when integrating the project into the main application or project in which solutions with other licenses were already involved.&lt;/p&gt;

&lt;p&gt;An example of multi-licensing is the Perl programming language. Perl has a &lt;a href="https://github.com/Perl/perl5/blob/blead/Copying" rel="noopener noreferrer"&gt;GPL&lt;/a&gt; license in the Copying file, and the &lt;a href="https://github.com/Perl/perl5/blob/blead/Artistic" rel="noopener noreferrer"&gt;Artistic&lt;/a&gt; license in the root directory. The README states that it is possible to distribute and modify the project according to the terms of one of the licenses. In addition, the License file may not contain the text of the license directly, but information about the licenses under which the project is published or the projects/libraries included in it.&lt;/p&gt;

&lt;p&gt;In addition, the License file may not contain the text of the license directly but information about the licenses under which the project is published or which projects/libraries are included in it. For example &lt;a href="https://github.com/LibrePDF/OpenPDF/blob/master/LICENSE.md" rel="noopener noreferrer"&gt;OpenPDF&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fllrgb15pogndqa4w0xlh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fllrgb15pogndqa4w0xlh.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to correctly add multiple licenses to your GitHub project?
&lt;/h2&gt;

&lt;p&gt;To display correctly on GitHub, you must add license files with the appropriate text inside. And place the files in the root directory of your project.&lt;/p&gt;

&lt;p&gt;The keyword License or COPYING must be placed at the beginning of the file name, for example, License.BSD, License_MIT. An excellent example of how to organize multiple licenses - &lt;a href="https://github.com/facebook/rocksdb/" rel="noopener noreferrer"&gt;RocksDB&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx0zs1ec0dxlt11i54xa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx0zs1ec0dxlt11i54xa.png" alt="Image description" width="800" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A dialog window with Licenses on GitHub&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The project includes a fork or part of another project with different licenses.
&lt;/h2&gt;

&lt;p&gt;When your open source project contains forks of other projects or used project code with different licenses and copyrights, a separate directory is created where the licenses of the projects used in your project are placed. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3f4slajefuwup2h10ul4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3f4slajefuwup2h10ul4.png" alt="Image description" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Refer to the following examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kubernetes/kubernetes/tree/master/LICENSES" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/elastic/elasticsearch/tree/main/client/rest/licenses" rel="noopener noreferrer"&gt;Elasticsearch client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/cockroachdb/cockroach/blob/master/LICENSE" rel="noopener noreferrer"&gt;CockroachDB&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following screenshot shows an example of organizing information about licenses that are used in different parts of Elasticsearch:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmksoolznkzycg7a5088b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmksoolznkzycg7a5088b.png" alt="Image description" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It may be a good practice to add appropriate license and/or copyright information to each source file. Sample: About &lt;a href="https://github.com/elastic/elasticsearch/blob/main/CONTRIBUTING.md#license-headers" rel="noopener noreferrer"&gt;License Headers in Contributing to elasticsearch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxpc9uus0on1az5hpzq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxpc9uus0on1az5hpzq7.png" alt="Image description" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About changing the license
&lt;/h2&gt;

&lt;p&gt;Can I change the project license? Yes, the license can be changed, but the license change must be agreed upon with all project contributors. Even if it was a contributor to the Readme file. So it's good to do it in the beginning when you're the only contributor. You can even change the license to a proprietary license, but such a change is not retroactive. Accordingly, all previous versions/releases can be used with the licenses in place at that time.&lt;br&gt;
There are cases when you transfer rights (copyright, moral rights) to an organization, a legal entity that owns the rights to the project. In this case, the relevant rights owners can change the license without the contributors' consent. See Contributor License Agreement (CLA)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case:&lt;/strong&gt; Facebook was using a BSD license plus their custom Additional Grant of Patent Rights. License &lt;a href="https://github.com/facebook/react/commit/b765fb25ebc6e53bb8de2496d2828d9d01c2774b" rel="noopener noreferrer"&gt;was changed to MIT&lt;/a&gt; on September 26, 2017, and the Patent grant was deleted.&lt;br&gt;
Some companies decide not to use React in their project because of the patent grant. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The license granted hereunder will terminate, automatically and without notice, if you (or any of your subsidiaries, corporate affiliates or agents) initiate directly or indirectly, or take a direct financial interest in, any Patent Assertion” &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A number of licenses require the project to be released under the same license and version or a later version of the corresponding license (e.g., GNU LGPL).&lt;/p&gt;

&lt;h3&gt;
  
  
  Contributor License Agreement (CLA)
&lt;/h3&gt;

&lt;p&gt;CLA - the document that regulates intellectual property of user contribution.&lt;br&gt;
In some cases, open source project owners/maintainers ask to sign a Contributor Agreement, which can affect copyright and other rules. So signing the CLA is one requirement for reviewing your Pull/Merge request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two options are available:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Copyright License.&lt;/strong&gt; The contributors retain the copyright to their contribution. Sample: &lt;a href="https://www.influxdata.com/legal/cla/" rel="noopener noreferrer"&gt;InfluxDB&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copyright Assignment.&lt;/strong&gt; The contributors transfer the copyright of their contribution to the project. Sample: &lt;a href="https://secure.na1.echosign.com/public/hostedForm?formid=95YMDL576B336E" rel="noopener noreferrer"&gt;Clojure Contributor License Agreement&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Transfer the copyright. Sample from the &lt;a href="https://www.mongodb.com/legal/contributor-agreement" rel="noopener noreferrer"&gt;MongoDB Contributor Agreement&lt;/a&gt;&lt;br&gt;
By submitting a Contribution, you assign to MongoDB all right, title and interest in any copyright you have in the Contribution, and you waive any rights, including any moral rights, database rights, etc., that may affect our ownership of the copyright in the Contribution.&lt;/p&gt;

&lt;p&gt;Open source &lt;a href="https://github.com/cla-assistant/cla-assistant" rel="noopener noreferrer"&gt;Contributor License Agreement assistant&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Friendly licenses for proprietary software
&lt;/h2&gt;

&lt;p&gt;For commercial companies, the question always arises, which products can be used in commercial/proprietary software (solutions), and what are the exceptions for this? Although, in particular, most licenses can be used in commercial software, you must also consider whether you are not violating other rights, including rights to trademarks and patents.&lt;/p&gt;

&lt;p&gt;Permissive licenses are often called commercially friendly. However, if the application/device uses a part licensed under the GPL, then, accordingly, the issue of publishing the entire source code will arise.&lt;/p&gt;

&lt;p&gt;Many commercial organizations and non-commercial organizations created their open source licenses with appropriate names:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Common Public License (IBM).&lt;/li&gt;
&lt;li&gt;Eclipse.&lt;/li&gt;
&lt;li&gt;PHP License 3.01.&lt;/li&gt;
&lt;li&gt;Mozilla Public License 2.0 (uses &lt;a href="https://github.com/hashicorp/terraform" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;W3C License (W3C).&lt;/li&gt;
&lt;li&gt;European Union Public License.&lt;/li&gt;
&lt;li&gt;Python License.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For many projects and products, it is important to keep track of which open source projects and under which licenses you use.&lt;/p&gt;

&lt;p&gt;In particular, Open source inventory is a mandatory stage in the following cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security audit of the company;&lt;/li&gt;
&lt;li&gt;Certifications (including information security);&lt;/li&gt;
&lt;li&gt;Merge and acquisition operations. The scope of the company's intellectual rights, patents, and developments should be determined.&lt;/li&gt;
&lt;li&gt;Investments in startups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my experience of working with startups, only once have they asked whether open source component licenses allow them to be used in commercial solutions and what obligations arise.&lt;/p&gt;

&lt;p&gt;Unfortunately, most project analyzers (Open source inventory) are applied before external requirements and are not integrated into the development process. And then, the report on the compatibility of licenses may look like a disappointing diagnosis of a doctor, and conditional treatment in such a case may be painful — rewriting components and searching for a replacement with appropriate licenses/patents.&lt;/p&gt;

&lt;p&gt;Instead, it is better to go through prevention, that is, to conditionally know about the topic of licenses - this guide is written for this. So creating license usage documentation and policies can help, regardless of the size of your company.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open source policies in commercial companies
&lt;/h2&gt;

&lt;p&gt;Some companies create their licensing policies. The policies describe procedures and requirements for publishing projects. In addition, there are also requirements for project licenses that can be used in the company. There may also be lists of valid and invalid licenses (for example, block, allow list).&lt;/p&gt;

&lt;p&gt;In particular, permissive licenses (Apache, MIT, BSD) or other special licenses of companies are usually added to the permissible ones. In most companies/organizations, the default copyright is the legal name. When creating and contributing to relevant projects, intellectual rights may belong to individual employees or be transferred to the company/customer (where the employee works), unless otherwise specified in the contract.&lt;/p&gt;

&lt;p&gt;For example, patent protection covers specific processes, products and methods; and copyright protects the corresponding work, in our case, program code, graphic elements, and images.&lt;/p&gt;

&lt;p&gt;I give an example of a list of licenses with a level of risk relative to use in proprietary software. The greater the risk, the greater the problem of using adequately licensed components in your proprietary (commercial) software.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ey92dbid1zt2zu7ygbn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ey92dbid1zt2zu7ygbn.png" alt="Image description" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open source inventory (BoM) is a mandatory stage before mergers and acquisitions, IPOs, and attracting investments. As a result, you can get information about the dependencies and licenses of the included components.&lt;/p&gt;

&lt;p&gt;Such reports can also identify components with restrictive requirements or incompatible with other components.&lt;/p&gt;

&lt;p&gt;Reports contain information about all included libraries/projects, including transitive dependencies.&lt;/p&gt;

&lt;p&gt;In the security field, we can often find tools for collecting information about the components of the analyzed software. Some of these tools and products also report information about licenses and conflicts between them. Most of the functionality of such tools is paid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interesting legal cases
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf" rel="noopener noreferrer"&gt;GOOGLE LLC v. ORACLE AMERICA, INC.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As often happens, large corporations acquire many projects and startups. Later, problems or claims regarding using open source projects or other resources protected by patents and copyrights appear.&lt;/p&gt;

&lt;p&gt;Google bought Android. Android code used Java API methods. Oracle's lawsuit alleged patent and copyright infringement related to Java SE. The trial took several stages, resumption of hearings in various courts. A decision by the US Supreme Court has determined that use falls under the term "fair use".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Copilot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, if you are training a neural network or your product includes models that are licensed under a free content license, what obligations arise in this case?&lt;/p&gt;

&lt;p&gt;GitHub Copilot was trained on repositories, including those with copyleft licenses, which stipulate that projects based on and/or incorporating the software are licensed under the same copyleft license.&lt;/p&gt;

&lt;p&gt;But developers/owners did not publish the GitHub Copilot source code. And not under a copyleft license, but, on the contrary, the use is paid according to the subscription model. In this case, using repositories for neuron training and using a project with a copyleft license is not the same, so it is challenging to comment unambiguously on the issue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Faker&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There was also an interesting case that is not directly related to licenses. Still, it raised several questions regarding the responsibility of developers of open source projects, and the distribution and use of open source projects by commercial companies.&lt;/p&gt;

&lt;p&gt;An NPM Faker library was published under the &lt;a href="https://web.archive.org/web/20201113033542/https://github.com/Marak/faker.js/blob/master/MIT-LICENSE.txt" rel="noopener noreferrer"&gt;MIT license&lt;/a&gt; (the project is no longer available). The library was used in many commercial companies and other open source projects (AWS CDK). The license provides for commercial use, but at one point, the developer decided to make specific changes that, when updated, disrupted the regular operation of applications in which the project is used.&lt;/p&gt;

&lt;p&gt;MIT protects authors and developers from possible damages and liability "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT...". But on the other hand, the changes made and further communication from the developer revealed that critical changes were made to the project because many commercial companies do not pay for the developer's work. However, the project was published on GitHub under a free-to-use public license.&lt;/p&gt;

&lt;p&gt;GitHub later closed access to the repository, which caused some questions from the developer and part of the open-source community.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using license templates (GitHub, GitLab)
&lt;/h2&gt;

&lt;p&gt;Previously, many open source projects were published without licenses. The situation in this direction changed after deploying related features in GitHub/GitLab. When creating a repository, you can choose a related license template. And in the license text, the corresponding copyright will be included (if the license provides for it). Usually, it's your name or the name of the organization. But even when using templates, a number of things should be done manually. For example, for Apache 2.0, the copyright must be added to a separate NOTICE file, but the file is not automatically created.&lt;/p&gt;

&lt;p&gt;But unfortunately, most licenses for private, small projects are not chosen wisely. For large projects, the choice is usually made by people with relevant experience. They already select a license that considers the project's specifics, forked projects, and potential license conflicts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqba0ctq5f86hsltlard5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqba0ctq5f86hsltlard5.png" alt="Image description" width="800" height="1083"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitLab also has a license selection functionality, but the functionality is available after the repository is created (and not during creation as in Github). Therefore, you need to go to the License section to choose a related license. In addition, in GitLab, for specific licenses, the copyright is not added to the corresponding NOTICE file but the text of the license. Namely, for Apache 2.0 and GPLv3.0 licenses, it is correct to add the copyright not to the license text itself but to the NOTICE file. For Apache 2.0, the license text in the section Appendix &lt;a href="https://github.com/oborys/Full-Guide-to-Open-Source-Licenses/blob/main/LICENSE#L189" rel="noopener noreferrer"&gt;lines 189-190&lt;/a&gt; specified what information should be entered in the NOTICE file. Same for GPLv3.0 (section END OF TERMS AND CONDITIONS) see &lt;a href="https://github.com/oborys/Full-Guide-to-Open-Source-Licenses/blob/main/License.GNU_GPLv3.0#L635" rel="noopener noreferrer"&gt;lines 633-635&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx2e5kvabafpp4930w2h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx2e5kvabafpp4930w2h.png" alt="Image description" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Other open source project aggregator platforms can also offer a choice of appropriate licenses or, like Google developers, limit the selection to the 6-9 most popular ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/oborys/Complete-Guide-to-Open-Source-Licenses" rel="noopener noreferrer"&gt;Edit or contribute on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>license</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>IoT application using LoRaWAN Network Server</title>
      <dc:creator>Oleksii Borisenko</dc:creator>
      <pubDate>Thu, 07 Apr 2022 16:45:52 +0000</pubDate>
      <link>https://forem.com/oborys/iot-application-using-lorawan-network-server-10gi</link>
      <guid>https://forem.com/oborys/iot-application-using-lorawan-network-server-10gi</guid>
      <description>&lt;p&gt;This story is about how my team and I developed an IoT application for parking that received data from IoT sensors, processed data, and displayed it. Also, in the solution, we have many features connected with booking parking slots, etc. &lt;br&gt;
Of course, since the time this application was created and is running (2019), other competitive solutions have significantly developed. The solution that uses computer vision or cheap sensors for underground parking is more effective, more inexpensive, or easy to deploy in some cases. The experience described below can also help create IoT applications to interact with various other sensors that work using sensors of movement, door opening, light, temperature and humidity, water meter, kilowatt-hour meter, etc.&lt;/p&gt;

&lt;p&gt;Сomponents used in this solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smart Parking devices (Libelium Smart Parking, TBS-220 geomagnetic vehicle detector)&lt;/li&gt;
&lt;li&gt;LoRa Gateway (Cisco Wireless Gateway for LoRaWAN)&lt;/li&gt;
&lt;li&gt;LoRaWAN Network Server (Actility or Open source &lt;a href="https://github.com/gotthardp/lorawan-server" rel="noopener noreferrer"&gt;LoRaWAN server&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;IoT app can be &lt;a href="https://developer.cisco.com/docs/iox/" rel="noopener noreferrer"&gt;deployed on IoT&lt;/a&gt; compute gateway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4mizqt4t23rk2uua0x0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4mizqt4t23rk2uua0x0.png" alt="IoT scheme" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why LoRa?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Extended range of one radio gateway - up to 15 km radius outside the city area (up to 10 in the city).&lt;/li&gt;
&lt;li&gt;Unlicensed frequency band - no use permit is required. &lt;/li&gt;
&lt;li&gt;Scalability - up to 20,000 end sensors per 1 gateway. &lt;/li&gt;
&lt;li&gt;Low cost of both end devices and radio gateways. &lt;/li&gt;
&lt;li&gt;Due to its low power consumption, the sensor runs on an average of 4-5 years of battery life, allowing it to be placed anywhere without wiring and power. &lt;/li&gt;
&lt;li&gt;Data Security - All data is encrypted by AES-128 by default; each sensor has its unique encryption keys.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In general, security aspects are also problems in this area. For example, there were a lot of cases when a home IoT system, based on an open source, was hacked, and the attacker was in control of turning on the light and getting control of other devices (blinds, electrical appliances, etc.) And also getting access to IP cameras.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwc7swizhrgk9dhxcql7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwc7swizhrgk9dhxcql7.png" alt="different technologies for IoT" width="800" height="342"&gt;&lt;/a&gt;&lt;br&gt;
Table comparing different technologies for IoT&lt;/p&gt;

&lt;p&gt;Are Sigfox and LoRa still competitors? Unfortunately, yes. But people aren’t as focused on network technology these days — they’re focused on use cases and applications. As a result, these technologies have been relegated to their proper place — they’re tools, nothing more.&lt;/p&gt;

&lt;p&gt;Each LoRa device sensor has unique parameters for recognizing in LoRa network and encrypting the data payload:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Device EUI&lt;/li&gt;
&lt;li&gt;Device Address&lt;/li&gt;
&lt;li&gt;Network session key&lt;/li&gt;
&lt;li&gt;Application session key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx2v7i6d222872s7vflj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx2v7i6d222872s7vflj.png" alt="IoT device interface" width="800" height="535"&gt;&lt;/a&gt;&lt;br&gt;
Many IoT device manufacturers have apps and interfaces for configuring devices and firmware.&lt;/p&gt;

&lt;p&gt;Some other settings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LoRaWAN join mode, ABP or OTAA&lt;/li&gt;
&lt;li&gt;LoRaWAN port&lt;/li&gt;
&lt;li&gt;LoRaWAN application key&lt;/li&gt;
&lt;li&gt;LoRaWAN application EUI&lt;/li&gt;
&lt;li&gt;LoRaWAN EUI that will be loaded from the device.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Network Server interface, device configuration&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcndpke70uuve2ka06lzr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcndpke70uuve2ka06lzr.png" alt="Image description" width="800" height="977"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Interaction with the sensors
&lt;/h2&gt;

&lt;p&gt;For interaction, we use Uplink and Downlink. Uplink is what we receive from a sensor or IoT device, and Downlink is the data we can send to IoT devices.&lt;br&gt;
We can have 12 bytes payload in the uplink, more precisely 96 bits. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgb3da5zcrvacde2tpub2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgb3da5zcrvacde2tpub2.png" alt="uplink" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What information can we extract from this?&lt;br&gt;
ID of the device, Battery level, Status of the parking slot, Temperature (Celsius degrees) from the node’s internal sensor.&lt;/p&gt;

&lt;p&gt;For example &lt;br&gt;
Payload: &lt;code&gt;0400003f34b909173f600fc2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwscyq7kvje903385v7y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwscyq7kvje903385v7y.png" alt="payload" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Python function that we use for extract the data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    def parsing_payload_hex(data, payload_key="{http://uri.actility.com/lora}payload_hex"):
        try:
            _hex = data[payload_key]
        except IndexError:
            raise IndexError('No frame in payloads')
        else:
            byte_binary = "{0:08b}".format(int(_hex[:2], 16))

            parking_slot = int(byte_binary[:1])     ## Occupation status    0 - free; 1 - occupied;
            battery = int(byte_binary[1])           ## Charge level         0 - Good; 1 - little;
            frame_type = int(byte_binary[4:8], 10)  ## Frame type           0 - Info; 1 - Keep-alive; 2 - daily update; ...

            return parking_slot, battery, frame_type, int(_hex[2:4], 16)
            ##       parking_slot|battery|frame_type|frame_counter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Application
&lt;/h2&gt;

&lt;p&gt;Technology stack: Vue.js, Python, C&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic capabilities:&lt;/strong&gt;&lt;br&gt;
The Application with GUI, where admin can add parkings, configure parking slots, assign parking slots to certain IoT devices. Essential features for users like displaying which parking slot is occupied/free. Review which slots are booked/available on a specific date and time. Send links for external users to book places for themselves.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4vac4tchrqvcvdaiysc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4vac4tchrqvcvdaiysc.png" alt="App GUI" width="800" height="634"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extra features:&lt;/strong&gt;&lt;br&gt;
Automatic cancellation of the booked place if the place was not being occupied within 15 minutes of the scheduled time.&lt;br&gt;
Ability to define a fixed parking space as available for booking during a specific period (for example, in case of vacation or business trip)&lt;br&gt;
Display users booking statistics&lt;br&gt;
Integration with 3d party messaging service&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsu0680acpr4n9rh627f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsu0680acpr4n9rh627f.png" alt="App menu" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, the admin can see statistics. For example, is the slot occupied during the booking period and the number of cancellations.&lt;/p&gt;

&lt;p&gt;We use this solution for corporate parking, where we have slots for guests and need to book it for guest customers or partners. Through API app can also send the card number to the 3d party system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faexzjdaclhoxzp0mf5ag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faexzjdaclhoxzp0mf5ag.png" alt="Booking" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can test your app using this &lt;a href="https://devnetsandbox.cisco.com/RM/Diagram/Index/5f411c0e-b387-4ae6-9ee7-ff793d925cff?diagramType=Topology" rel="noopener noreferrer"&gt;sandbox&lt;/a&gt;&lt;/p&gt;

</description>
      <category>iot</category>
      <category>python</category>
      <category>lorawan</category>
      <category>vue</category>
    </item>
  </channel>
</rss>
