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
from pydantic import BaseModel, Field | |
from typing import Optional, List, Generic, TypeVar | |
__all__ = ["Pagination", "PaginationResponse"] | |
T = TypeVar("T") | |
class Pagination(BaseModel): | |
offset: int = Field(1, ge=1) | |
limit: int = Field(10, ge=1, le=100) |
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 socketio | |
import asyncio | |
from abc import ABC, abstractmethod | |
from typing import Dict | |
import logging | |
import threading | |
import time | |
import sys | |
logger = logging.getLogger(__name__) |
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 yaml | |
with open("environment.yaml") as f: | |
environment_list = yaml.safe_load(f) | |
requirements = [] | |
for dep in environment_list['dependencies']: | |
if isinstance(dep, str): | |
package, package_version = dep.split('=') | |
if package_version == '0': | |
continue |