Skip to content

Commit

Permalink
Create a util script to convert .env to datastore
Browse files Browse the repository at this point in the history
Create an endpoint to put multiple secrets at a time
  • Loading branch information
dormant-user committed Sep 17, 2024
1 parent 7543da6 commit 8d00d11
Show file tree
Hide file tree
Showing 14 changed files with 350 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ PyNinja.egg-info/

doc_gen/_*

temp.py
temp*.py

logging.ini
*.log
*.db
*.env

discard/
7 changes: 6 additions & 1 deletion doc_gen/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Models

====

.. automodule:: vaultapi.models.EnvConfig(BaseSettings)
.. automodule:: vaultapi.models
:exclude-members: RateLimit, Session, EnvConfig

Payload
Expand Down Expand Up @@ -76,6 +76,11 @@ Squire

.. automodule:: vaultapi.squire

Util
====

.. automodule:: vaultapi.util

Indices and tables
==================

Expand Down
7 changes: 6 additions & 1 deletion docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Models

====

.. automodule:: vaultapi.models.EnvConfig(BaseSettings)
.. automodule:: vaultapi.models
:exclude-members: RateLimit, Session, EnvConfig

Payload
Expand Down Expand Up @@ -76,6 +76,11 @@ Squire

.. automodule:: vaultapi.squire

Util
====

.. automodule:: vaultapi.util

Indices and tables
==================

Expand Down
49 changes: 42 additions & 7 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,41 @@ <h2 id="A">A</h2>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.routes.create_table">create_table() (in module vaultapi.routes)</a>
<li><a href="index.html#vaultapi.models.complexity_checker">complexity_checker() (in module vaultapi.models)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.database.create_table">create_table() (in module vaultapi.database)</a>

<ul>
<li><a href="index.html#vaultapi.routes.create_table">(in module vaultapi.routes)</a>
</li>
</ul></li>
</ul></td>
</tr></table>

<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.models.EnvConfig.database">database (vaultapi.models.EnvConfig attribute)</a>
<li><a href="index.html#vaultapi.models.Database">Database (class in vaultapi.models)</a>
</li>
<li><a href="index.html#vaultapi.models.database">database (in module vaultapi.models)</a>

<ul>
<li><a href="index.html#vaultapi.models.EnvConfig.database">(vaultapi.models.EnvConfig attribute)</a>
</li>
</ul></li>
<li><a href="index.html#vaultapi.routes.delete_secret">delete_secret() (in module vaultapi.routes)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.payload.DeleteSecret">DeleteSecret (class in vaultapi.payload)</a>
</li>
<li><a href="index.html#vaultapi.routes.docs">docs() (in module vaultapi.routes)</a>
</li>
<li><a href="index.html#vaultapi.util.dotenv_to_table">dotenv_to_table() (in module vaultapi.util)</a>
</li>
<li><a href="index.html#vaultapi.database.drop_table">drop_table() (in module vaultapi.database)</a>
</li>
</ul></td>
</tr></table>
Expand All @@ -115,6 +133,8 @@ <h2 id="E">E</h2>
<li><a href="index.html#vaultapi.main.enable_cors">enable_cors() (in module vaultapi.main)</a>
</li>
<li><a href="index.html#vaultapi.models.EnvConfig.endpoints">endpoints (vaultapi.models.EnvConfig attribute)</a>
</li>
<li><a href="index.html#vaultapi.models.env">env (in module vaultapi.models)</a>
</li>
<li><a href="index.html#vaultapi.models.EnvConfig">EnvConfig (class in vaultapi.models)</a>
</li>
Expand Down Expand Up @@ -234,13 +254,15 @@ <h2 id="M">M</h2>
</li>
<li><a href="index.html#module-vaultapi.main">vaultapi.main</a>
</li>
<li><a href="index.html#module-vaultapi.models.EnvConfig-BaseSettings">vaultapi.models.EnvConfig(BaseSettings)</a>
<li><a href="index.html#module-vaultapi.models">vaultapi.models</a>
</li>
<li><a href="index.html#module-vaultapi.rate_limit">vaultapi.rate_limit</a>
</li>
<li><a href="index.html#module-vaultapi.routes">vaultapi.routes</a>
</li>
<li><a href="index.html#module-vaultapi.squire">vaultapi.squire</a>
</li>
<li><a href="index.html#module-vaultapi.util">vaultapi.util</a>
</li>
</ul></li>
</ul></td>
Expand All @@ -255,16 +277,18 @@ <h2 id="P">P</h2>
</li>
<li><a href="index.html#vaultapi.models.EnvConfig.parse_endpoints">parse_endpoints() (vaultapi.models.EnvConfig class method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.models.EnvConfig.port">port (vaultapi.models.EnvConfig attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.database.put_secret">put_secret() (in module vaultapi.database)</a>

<ul>
<li><a href="index.html#vaultapi.routes.put_secret">(in module vaultapi.routes)</a>
</li>
</ul></li>
<li><a href="index.html#vaultapi.routes.put_secrets">put_secrets() (in module vaultapi.routes)</a>
</li>
<li><a href="index.html#vaultapi.payload.PutSecret">PutSecret (class in vaultapi.payload)</a>
</li>
</ul></td>
Expand Down Expand Up @@ -312,6 +336,10 @@ <h2 id="S">S</h2>

<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.database.table_exists">table_exists() (in module vaultapi.database)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#vaultapi.payload.DeleteSecret.table_name">table_name (vaultapi.payload.DeleteSecret attribute)</a>

Expand Down Expand Up @@ -360,10 +388,10 @@ <h2 id="V">V</h2>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
vaultapi.models.EnvConfig(BaseSettings)
vaultapi.models

<ul>
<li><a href="index.html#module-vaultapi.models.EnvConfig-BaseSettings">module</a>
<li><a href="index.html#module-vaultapi.models">module</a>
</li>
</ul></li>
<li>
Expand All @@ -385,6 +413,13 @@ <h2 id="V">V</h2>

<ul>
<li><a href="index.html#module-vaultapi.squire">module</a>
</li>
</ul></li>
<li>
vaultapi.util

<ul>
<li><a href="index.html#module-vaultapi.util">module</a>
</li>
</ul></li>
</ul></td>
Expand Down
Loading

0 comments on commit 8d00d11

Please sign in to comment.