<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ueponx</author_name>
  <author_url>https://blog.hatena.ne.jp/ueponx/</author_url>
  <blog_title>uepon日々の備忘録</blog_title>
  <blog_url>https://uepon.hatenadiary.com/</blog_url>
  <categories>
    <anon>Google</anon>
    <anon>python</anon>
    <anon>コンピュータ</anon>
    <anon>開発</anon>
  </categories>
  <description>Google Colaboratory（以下Colab）でAPIにアクセスするコードを書こうかなと思ってみたのですが、一般的なコード例では環境変数にAPIキーを設定して、環境変数の読み出しによって取得するような書き方をしますが、Colabの場合だとソース（ノートブック）にあらわれてくるのでどうすればいいのかなと悩んだので、ちょっと調べてみました。 Colabでも環境変数は使用できる…けど…。 Colabの環境でも環境変数を使用することは可能です。 import os # 環境変数の設定 os.environ['MY_VARIABLE'] = 'my_value' # 環境変数の取得 my_va…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fuepon.hatenadiary.com%2Fentry%2F2024%2F07%2F23%2F115411&quot; title=&quot;APIキーを安全に扱う！Google Colabでアクセスキーをセキュアに使用する方法 - uepon日々の備忘録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/u/ueponx/20240723/20240723001319.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-07-23 11:54:11</published>
  <title>APIキーを安全に扱う！Google Colabでアクセスキーをセキュアに使用する方法</title>
  <type>rich</type>
  <url>https://uepon.hatenadiary.com/entry/2024/07/23/115411</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
