This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sqlalchemy Async | |
# Records: 164 | |
# Time: 15.389007091522217 | |
# Average: 0.30778014183044433 | |
# - | |
# Sqlalchemy Sync | |
# Records: 164 | |
# Time: 15.195691585540771 | |
# Average: 0.30391383171081543 | |
# - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import dataclasses | |
import time | |
import oracledb | |
from sqlalchemy import text, URL | |
from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine | |
from sqlalchemy import create_engine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dataclasses | |
import logging | |
from typing import Annotated, Callable, Dict, List | |
from fastapi import Depends, FastAPI | |
from fastapi.dependencies.models import Dependant | |
from fastapi.dependencies.utils import get_dependant, solve_dependencies | |
from starlette.requests import Request | |
from utilities.events import EventsCollection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dataclasses | |
import logging | |
from typing import Annotated, Callable, Dict, List | |
from fastapi import Depends, FastAPI | |
logger = logging.getLogger(__name__) | |
class EventsCollection(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import typing | |
from fastapi import Depends, HTTPException | |
from starlette.requests import Request | |
from domain.user.model import ProfileModel | |
from exception import HTTPForbiddenException | |
from permissions import permissions as system_permissions | |
from utilities.permission import Permission |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from pathlib import Path | |
from litestar import Controller, Litestar, Request, Router, get | |
from litestar.connection import ASGIConnection | |
from litestar.exceptions import PermissionDeniedException | |
from litestar.handlers import BaseRouteHandler | |
from litestar.logging import LoggingConfig | |
from litestar.openapi import OpenAPIConfig | |
from litestar.openapi.spec import Components, SecurityScheme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button | |
type="button" | |
onclick="printit(['file1.pdf','file2.pdf'])" | |
> | |
Print pdf | |
</button > | |
<div id='pdf-viewer'></div > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
postman makes finding the collection id and uid rather.... "interesting". | |
step 1: import your collections from files (collection not api) - | |
on the left menu in postman go to "collections", import, select your file | |
if you import the file under "api" you will end up with 2 that look the same for step 2. | |
step 2: setup a GET request in postman to https://api.getpostman.com/collections | |
add a "header" and call it "X-Api-Key" and the value is the api key setup in secret.js. click send |