Skip to content

Commit

Permalink
Rename directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Aug 19, 2024
1 parent e133e5c commit 1809128
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions decryptor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import requests
from cryptography.fernet import Fernet

from pyvault.models import session
from pyvault.squire import load_env
from vaultapi.models import session
from vaultapi.squire import load_env

env = load_env()
session.fernet = Fernet(env.secret)
Expand Down
4 changes: 2 additions & 2 deletions encryptor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pyvault
import vaultapi

if __name__ == "__main__":
pyvault.start()
vaultapi.start()
3 changes: 0 additions & 3 deletions pyvault/__init__.py

This file was deleted.

3 changes: 3 additions & 0 deletions vaultapi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from vaultapi.main import start # noqa: F401

version = "0.0.0"
2 changes: 1 addition & 1 deletion pyvault/auth.py → vaultapi/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from fastapi import Request
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer

from pyvault import exceptions, models
from vaultapi import exceptions, models

LOGGER = logging.getLogger("uvicorn.default")
EPOCH = lambda: int(time.time()) # noqa: E731
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions pyvault/main.py → vaultapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from cryptography.fernet import Fernet
from fastapi import FastAPI

import pyvault
from pyvault import models, routers, squire
import vaultapi
from vaultapi import models, routers, squire

LOGGER = logging.getLogger("uvicorn.default")

Expand All @@ -29,9 +29,9 @@ def start(**kwargs) -> None:
models.session.fernet = Fernet(models.env.secret)
app = FastAPI(
routes=routers.get_all_routes(),
title="PyVault",
title="vaultapi",
description="Lightweight service to serve secrets and environment variables",
version=pyvault.version,
version=vaultapi.version,
)
kwargs = dict(
host=models.env.host,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pyvault/rate_limit.py → vaultapi/rate_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from fastapi import HTTPException, Request

from pyvault import models
from vaultapi import models


class RateLimiter:
Expand Down
2 changes: 1 addition & 1 deletion pyvault/routers.py → vaultapi/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from fastapi.routing import APIRoute
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer

from pyvault import auth, exceptions, models, rate_limit
from vaultapi import auth, exceptions, models, rate_limit

LOGGER = logging.getLogger("uvicorn.default")
security = HTTPBearer()
Expand Down
2 changes: 1 addition & 1 deletion pyvault/squire.py → vaultapi/squire.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yaml

from pyvault.models import EnvConfig
from vaultapi.models import EnvConfig


def envfile_loader(filename: str | os.PathLike) -> EnvConfig:
Expand Down

0 comments on commit 1809128

Please sign in to comment.