Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoCelmer committed Jan 30, 2023
2 parents 0d7e32f + 030a899 commit 86edf0a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ ENVIRONMENT=dev
MYSQL_DATABASE_URL=mysql+pymysql://username:password@host/database
NOSQL_DATABASE_URL=mongodb://username:password@host
SECRET_KEY=KEY@123
SENTRY_DSN=https://[email protected]/id
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0.0"
__version__ = "1.0.1"

__author__ = 'Fernando Celmer <[email protected]>'
__copyright__ = """MIT License
Expand Down
2 changes: 1 addition & 1 deletion app/core/database/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
engine = create_engine(
url=config.get("MYSQL_DATABASE_URL"),
connect_args={},
pool_recycle=300,
pool_recycle=420,
pool_pre_ping=True)

SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Expand Down
1 change: 1 addition & 0 deletions app/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def set_up():
"MYSQL_DATABASE_URL": environ.get("MYSQL_DATABASE_URL", "sqlite:///./sql_app.db"),
"NOSQL_DATABASE_URL": environ.get("NOSQL_DATABASE_URL"),
"SECRET_KEY": environ.get("SECRET_KEY", "LinuxProfile"),
"SENTRY_DSN": environ.get("SENTRY_DSN"),
"BASE_DIR": path.abspath(path.dirname(__file__))
}
return config
15 changes: 15 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
import sentry_sdk
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration

from fastapi import FastAPI, Depends
from mangum import Mangum

from app import __version__
from app.api.auth import auth
from app.api.v1.routers import v1

from app.core.settings import set_up
from app.core.security import authorization


config = set_up()
sentry_sdk.init(
dsn=config.get("SENTRY_DSN"),
integrations=[
AwsLambdaIntegration(timeout_warning=True),
],
traces_sample_rate=1.0,
)


app = FastAPI(
title="LinuxProfile API",
description="Linux Profile Project API",
Expand Down
2 changes: 2 additions & 0 deletions docs/nav/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## v1.0.1

- [πŸ“¦ PyPI - Build 1.0.1](https://github.com/MyLinuxProfile/linux-profile-api/releases/tag/v1.0.1)
- [πŸ“Œ ISSUE-16 - Integration with Sentry.io](https://github.com/MyLinuxProfile/linux-profile-api/issues/16)
- [πŸ“Œ ISSUE-14 - Adjust encryption type for authentication](https://github.com/MyLinuxProfile/linux-profile-api/issues/14)
- [πŸ“Œ ISSUE-10 - Adjust security settings](https://github.com/MyLinuxProfile/linux-profile-api/issues/10)
- [πŸ“Œ ISSUE-9 - Creating Profile Management and Sync](https://github.com/MyLinuxProfile/linux-profile-api/issues/9)
- [πŸ“Œ ISSUE-8 - MongoDB implementation base settings](https://github.com/MyLinuxProfile/linux-profile-api/issues/8)
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ SQLAlchemy==1.4.46
uvicorn==0.20.0
PyJWT==2.6.0
motor==3.1.1
passlib==1.7.4
passlib==1.7.4
sentry-sdk==1.14.0

0 comments on commit 86edf0a

Please sign in to comment.