From d7dccad7f89e48b3676433256a00dd1c70b812b4 Mon Sep 17 00:00:00 2001 From: Dave Gaeddert Date: Wed, 22 Jan 2025 17:07:19 -0600 Subject: [PATCH] Import/start plain-api --- plain-api/LICENSE | 28 ++ plain-api/README.md | 3 + plain-api/plain/api/README.md | 1 + plain-api/plain/api/__init__.py | 0 plain-api/plain/api/config.py | 6 + plain-api/plain/api/forms.py | 25 ++ .../plain/api/migrations/0001_initial.py | 38 ++ .../api/migrations/0002_apikey_expires_at.py | 18 + plain-api/plain/api/migrations/__init__.py | 0 plain-api/plain/api/models.py | 33 ++ plain-api/plain/api/openapi.py | 375 ++++++++++++++++++ plain-api/plain/api/responses.py | 42 ++ plain-api/plain/api/views.py | 219 ++++++++++ plain-api/pyproject.toml | 27 ++ plain-api/uv.lock | 216 ++++++++++ 15 files changed, 1031 insertions(+) create mode 100644 plain-api/LICENSE create mode 100644 plain-api/README.md create mode 100644 plain-api/plain/api/README.md create mode 100644 plain-api/plain/api/__init__.py create mode 100644 plain-api/plain/api/config.py create mode 100644 plain-api/plain/api/forms.py create mode 100644 plain-api/plain/api/migrations/0001_initial.py create mode 100644 plain-api/plain/api/migrations/0002_apikey_expires_at.py create mode 100644 plain-api/plain/api/migrations/__init__.py create mode 100644 plain-api/plain/api/models.py create mode 100644 plain-api/plain/api/openapi.py create mode 100644 plain-api/plain/api/responses.py create mode 100644 plain-api/plain/api/views.py create mode 100644 plain-api/pyproject.toml create mode 100644 plain-api/uv.lock diff --git a/plain-api/LICENSE b/plain-api/LICENSE new file mode 100644 index 0000000000..4a29315c05 --- /dev/null +++ b/plain-api/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2025, Dropseed, LLC + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/plain-api/README.md b/plain-api/README.md new file mode 100644 index 0000000000..2bdb8381ea --- /dev/null +++ b/plain-api/README.md @@ -0,0 +1,3 @@ + + +# plain.api diff --git a/plain-api/plain/api/README.md b/plain-api/plain/api/README.md new file mode 100644 index 0000000000..5318f8a7c4 --- /dev/null +++ b/plain-api/plain/api/README.md @@ -0,0 +1 @@ +# plain.api diff --git a/plain-api/plain/api/__init__.py b/plain-api/plain/api/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plain-api/plain/api/config.py b/plain-api/plain/api/config.py new file mode 100644 index 0000000000..44a762dce4 --- /dev/null +++ b/plain-api/plain/api/config.py @@ -0,0 +1,6 @@ +from plain.packages import PackageConfig + + +class Config(PackageConfig): + name = "plain.api" + label = "plainapi" # Primarily for migrations diff --git a/plain-api/plain/api/forms.py b/plain-api/plain/api/forms.py new file mode 100644 index 0000000000..e069a25b71 --- /dev/null +++ b/plain-api/plain/api/forms.py @@ -0,0 +1,25 @@ +# from bolt.exceptions import ValidationError + +# class APIFormMixin: +# def clean(self): +# cleaned_data = super().clean() + +# # Make sure all the field names are present in the input data +# for name, field in self.fields.items(): +# if name not in self.data: +# raise ValidationError(f"Missing field {name}") + +# return cleaned_data + + +class APIPartialFormMixin: + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + # If any field is not present in the JSON input, + # then act as if it's "disabled" so Bolt + # will keep the initial value instead of setting it to the default. + # This is required because stuff like checkbox doesn't submit in HTML form data when false. + for name, field in self.fields.items(): + if name not in self.data: + field.disabled = True diff --git a/plain-api/plain/api/migrations/0001_initial.py b/plain-api/plain/api/migrations/0001_initial.py new file mode 100644 index 0000000000..b0fbe1342d --- /dev/null +++ b/plain-api/plain/api/migrations/0001_initial.py @@ -0,0 +1,38 @@ +# Generated by Plain 0.17.0 on 2025-01-22 20:02 + +import uuid + +import plain.api.models +from plain import models +from plain.models import migrations + + +class Migration(migrations.Migration): + initial = True + + dependencies = [] + + operations = [ + migrations.CreateModel( + name="APIKey", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True)), + ( + "uuid", + models.UUIDField(default=uuid.uuid4, editable=False, unique=True), + ), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("updated_at", models.DateTimeField(auto_now=True)), + ("last_used_at", models.DateTimeField(blank=True, null=True)), + ("name", models.CharField(blank=True, max_length=255)), + ( + "token", + models.CharField( + default=plain.api.models.generate_token, + max_length=40, + unique=True, + ), + ), + ], + ), + ] diff --git a/plain-api/plain/api/migrations/0002_apikey_expires_at.py b/plain-api/plain/api/migrations/0002_apikey_expires_at.py new file mode 100644 index 0000000000..aaf319b186 --- /dev/null +++ b/plain-api/plain/api/migrations/0002_apikey_expires_at.py @@ -0,0 +1,18 @@ +# Generated by Plain 0.17.0 on 2025-01-22 21:02 + +from plain import models +from plain.models import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("plainapi", "0001_initial"), + ] + + operations = [ + migrations.AddField( + model_name="apikey", + name="expires_at", + field=models.DateTimeField(blank=True, null=True), + ), + ] diff --git a/plain-api/plain/api/migrations/__init__.py b/plain-api/plain/api/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plain-api/plain/api/models.py b/plain-api/plain/api/models.py new file mode 100644 index 0000000000..92215eaf78 --- /dev/null +++ b/plain-api/plain/api/models.py @@ -0,0 +1,33 @@ +import binascii +import os +import uuid + +from plain import models + + +def generate_token(): + return binascii.hexlify(os.urandom(20)).decode() + + +class APIKey(models.Model): + uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True) + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + expires_at = models.DateTimeField(blank=True, null=True) + last_used_at = models.DateTimeField(blank=True, null=True) + + name = models.CharField(max_length=255, blank=True) + + token = models.CharField(max_length=40, default=generate_token, unique=True) + + # Connect to a user, for example, from your own model: + # api_key = models.OneToOneField( + # APIKey, + # on_delete=models.CASCADE, + # related_name="user", + # null=True, + # blank=True, + # ) + + def __str__(self): + return self.name or str(self.uuid) diff --git a/plain-api/plain/api/openapi.py b/plain-api/plain/api/openapi.py new file mode 100644 index 0000000000..321a73197b --- /dev/null +++ b/plain-api/plain/api/openapi.py @@ -0,0 +1,375 @@ +from typing import Any +from uuid import UUID + +from plain.forms import fields +from plain.urls import get_resolver +from plain.urls.converters import get_converters +from plain.views import View + +from .responses import JsonResponse, JsonResponseCreated, JsonResponseList +from .views import APIBaseView + + +class OpenAPISchemaView(View): + openapi_title: str + openapi_version: str + openapi_urlconf: str + + def get(self): + # TODO can heaviliy cache this - browser headers? or cache the schema obj? + return JsonResponse( + OpenAPISchema( + title=self.openapi_title, + version=self.openapi_version, + urlconf=self.openapi_urlconf, + ), + json_dumps_params={"sort_keys": True}, + ) + + +class OpenAPISchema(dict): + def __init__(self, *, title: str, version: str, urlconf="app.api.urls"): + self.urlconf = urlconf + self.url_converters = { + class_instance.__class__: key + for key, class_instance in get_converters().items() + } + paths = self.get_paths() + super().__init__( + openapi="3.0.0", + info={ + "title": title, + "version": version, + # **moreinfo, or info is a dict? + }, + paths=paths, + # "404": { + # "$ref": "#/components/responses/not_found" + # }, + # "422": { + # "$ref": "#/components/responses/validation_failed_simple" + # } + ) + + # def extract_components(self, paths): + # """Look through the paths and find and repeated definitions + # that can be pulled out as components.""" + # from collections import Counter + # components = Counter() + # for path in paths.values(): + + def get_paths(self) -> dict[str, dict[str, Any]]: + resolver = get_resolver(self.urlconf) + paths = {} + + for url_pattern in resolver.url_patterns: + for pattern, root_path in self.url_patterns_from_url_pattern( + url_pattern, "/" + ): + path = self.path_from_url_pattern(pattern, root_path) + if operations := self.operations_from_url_pattern(pattern): + paths[path] = operations + if parameters := self.parameters_from_url_patterns( + [url_pattern, pattern] + ): + # Assume all methods have the same parameters for now (path params) + for method in operations: + operations[method]["parameters"] = parameters + + return paths + + def url_patterns_from_url_pattern(self, url_pattern, root_path) -> list: + if hasattr(url_pattern, "url_patterns"): + include_path = self.path_from_url_pattern(url_pattern, root_path) + url_patterns = [] + for u in url_pattern.url_patterns: + url_patterns.extend(self.url_patterns_from_url_pattern(u, include_path)) + return url_patterns + else: + return [(url_pattern, root_path)] + + def path_from_url_pattern(self, url_pattern, root_path) -> str: + path = root_path + str(url_pattern.pattern) + + for name, converter in url_pattern.pattern.converters.items(): + key = self.url_converters[converter.__class__] + path = path.replace(f"<{key}:{name}>", f"{{{name}}}") + return path + + def parameters_from_url_patterns(self, url_patterns) -> list[dict[str, Any]]: + """Need to process any parent/included url patterns too""" + parameters = [] + + for url_pattern in url_patterns: + for name, converter in url_pattern.pattern.converters.items(): + parameters.append( + { + "name": name, + "in": "path", + "required": True, + "schema": { + "type": "string", + "pattern": converter.regex, + # "format": "uuid", + }, + } + ) + + return parameters + + def operations_from_url_pattern(self, url_pattern) -> dict[str, Any]: + view_class = url_pattern.callback.view_class + + if not issubclass(view_class, APIBaseView): + return {} + + operations = {} + + known_http_method_names = [ + "get", + "post", + "put", + "patch", + "delete", + # Don't care about these ones... + # "head", + # "options", + # "trace", + ] + + for method in known_http_method_names: + if not hasattr(view_class, method): + continue + + if responses := self.responses_from_class_method(view_class, method): + operations[method] = { + "responses": responses, + } + + if parameters := self.request_body_from_class_method(view_class, method): + operations[method]["requestBody"] = parameters + + return operations + + def request_body_from_class_method(self, view_class, method: str) -> dict: + """Gets parameters from the form_class on a view""" + + if method not in ("post", "put", "patch"): + return {} + + form_class = view_class.form_class + if not form_class: + return {} + + parameters = [] + # Any args or kwargs in form.__init__ need to be optional + # for this to work... + for name, field in form_class().fields.items(): + parameters.append( + { + "name": name, + # "in": "query", + # "required": field.required, + "schema": self.type_to_schema_obj(field), + } + ) + + return { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {p["name"]: p["schema"] for p in parameters}, + } + }, + }, + } + + def responses_from_class_method( + self, view_class, method: str + ) -> dict[str, dict[str, Any]]: + class_method = getattr(view_class, method) + return_type = class_method.__annotations__["return"] + + if hasattr(return_type, "status_code"): + return_types = [return_type] + else: + # Assume union... + return_types = return_type.__args__ + + responses: dict[str, dict[str, Any]] = {} + + for return_type in return_types: + if return_type is JsonResponse or return_type is JsonResponseCreated: + schema = self.type_to_schema_obj( + view_class.object_to_dict.__annotations__["return"] + ) + + content = {"application/json": {"schema": schema}} + elif return_type is JsonResponseList: + schema = self.type_to_schema_obj( + view_class.object_to_dict.__annotations__["return"] + ) + + content = { + "application/json": { + "schema": { + "type": "array", + "items": schema, + } + } + } + else: + content = None + + response_key = str(return_type.status_code) + responses[response_key] = {} + + if description := getattr(return_type, "openapi_description", ""): + responses[response_key]["description"] = description + + responses["5XX"] = { + "description": "Server error", + } + + if content: + responses[response_key]["content"] = content + + return responses + + def type_to_schema_obj(self, t) -> dict[str, Any]: + # if it's a union with None, add nullable: true + + # if t has a comment, add description + # import inspect + # if description := inspect.getdoc(t): + # extra_fields = {"description": description} + # else: + extra_fields: dict[str, Any] = {} + + if hasattr(t, "__annotations__") and t.__annotations__: + # It's a TypedDict... + return { + "type": "object", + "properties": { + k: self.type_to_schema_obj(v) for k, v in t.__annotations__.items() + }, + **extra_fields, + } + + if hasattr(t, "__origin__"): + if t.__origin__ is list: + return { + "type": "array", + "items": self.type_to_schema_obj(t.__args__[0]), + **extra_fields, + } + elif t.__origin__ is dict: + return { + "type": "object", + "properties": { + k: self.type_to_schema_obj(v) + for k, v in t.__args__[1].__annotations__.items() + }, + **extra_fields, + } + else: + raise ValueError(f"Unknown type: {t}") + + if hasattr(t, "__args__") and len(t.__args__) == 2 and type(None) in t.__args__: + return { + **self.type_to_schema_obj(t.__args__[0]), + "nullable": True, + **extra_fields, + } + + type_mappings: dict[Any, dict] = { + str: { + "type": "string", + }, + int: { + "type": "integer", + }, + float: { + "type": "number", + }, + bool: { + "type": "boolean", + }, + dict: { + "type": "object", + }, + list: { + "type": "array", + }, + UUID: { + "type": "string", + "format": "uuid", + }, + fields.IntegerField: { + "type": "integer", + }, + fields.FloatField: { + "type": "number", + }, + fields.DateTimeField: { + "type": "string", + "format": "date-time", + }, + fields.DateField: { + "type": "string", + "format": "date", + }, + fields.TimeField: { + "type": "string", + "format": "time", + }, + fields.EmailField: { + "type": "string", + "format": "email", + }, + fields.URLField: { + "type": "string", + "format": "uri", + }, + fields.UUIDField: { + "type": "string", + "format": "uuid", + }, + fields.DecimalField: { + "type": "number", + }, + # fields.FileField: { + # "type": "string", + # "format": "binary", + # }, + fields.ImageField: { + "type": "string", + "format": "binary", + }, + fields.BooleanField: { + "type": "boolean", + }, + fields.NullBooleanField: { + "type": "boolean", + "nullable": True, + }, + fields.CharField: { + "type": "string", + }, + fields.SlugField: { + "type": "string", + }, + fields.EmailField: { + "type": "string", + "format": "email", + }, + } + + schema = type_mappings.get(t, {}) + if not schema: + schema = type_mappings.get(t.__class__, {}) + if not schema: + raise ValueError(f"Unknown type: {t}") + + return {**schema, **extra_fields} diff --git a/plain-api/plain/api/responses.py b/plain-api/plain/api/responses.py new file mode 100644 index 0000000000..425752aa6a --- /dev/null +++ b/plain-api/plain/api/responses.py @@ -0,0 +1,42 @@ +from plain import http + + +class JsonResponseList(http.JsonResponse): + openapi_description = "List of objects" + + def __init__(self, data, *args, **kwargs): + if not isinstance(data, list): + raise TypeError("data must be a list") + kwargs["safe"] = False # Allow a list to be dumped instead of a dict + super().__init__(data, *args, **kwargs) + + +class JsonResponseCreated(http.JsonResponse): + status_code = 201 + openapi_description = "Created" + + +class JsonResponseBadRequest(http.JsonResponse): + status_code = 400 + openapi_description = "Bad request" + + +class HttpNoContentResponse(http.Response): + status_code = 204 + openapi_description = "No content" + + +class Response(http.Response): + openapi_description = "OK" + + +class ResponseBadRequest(http.ResponseBadRequest): + openapi_description = "Bad request" + + +class ResponseNotFound(http.ResponseNotFound): + openapi_description = "Not found" + + +class JsonResponse(http.JsonResponse): + openapi_description = "OK" diff --git a/plain-api/plain/api/views.py b/plain-api/plain/api/views.py new file mode 100644 index 0000000000..038168bc19 --- /dev/null +++ b/plain-api/plain/api/views.py @@ -0,0 +1,219 @@ +import datetime +import json +from typing import TYPE_CHECKING, Any + +from plain.auth.views import AuthViewMixin +from plain.exceptions import ObjectDoesNotExist +from plain.views.base import View +from plain.views.csrf import CsrfExemptViewMixin +from plain.views.exceptions import ResponseException + +from .responses import ( + HttpNoContentResponse, + JsonResponse, + JsonResponseBadRequest, + JsonResponseCreated, + JsonResponseList, + ResponseBadRequest, + ResponseNotFound, +) + +if TYPE_CHECKING: + from plain.forms import BaseForm + +from .models import APIKey + + +class APIAuthViewMixin(AuthViewMixin): + # Disable login redirects + login_url = None + + def get_api_key(self) -> APIKey | None: + if "Authorization" in self.request.headers: + header_value = self.request.headers["Authorization"] + try: + header_token = header_value.split("Bearer ")[1] + except IndexError: + raise ResponseException( + ResponseBadRequest("Invalid Authorization header") + ) + + try: + api_key = APIKey.objects.get(token=header_token) + except APIKey.DoesNotExist: + raise ResponseException(ResponseBadRequest("Invalid API token")) + + if api_key.expires_at and api_key.expires_at < datetime.datetime.now(): + raise ResponseException(ResponseBadRequest("API token has expired")) + + return api_key + + def check_auth(self) -> None: + if not hasattr(self, "request"): + raise AttributeError( + "APIAuthViewMixin requires the request attribute to be set." + ) + + # If the user is already known, exit early + if self.request.user: + super().check_auth() + return + + if api_key := self.get_api_key(): + # Put the api_key on the request so we can access it + self.request.api_key = api_key + + # Set the user if api_key has that attribute (typically from a OneToOneField) + if user := getattr(api_key, "user", None): + self.request.user = user + + # Run the regular auth checks which will look for self.request.user + super().check_auth() + + +class APIBaseView(View): + form_class: type["BaseForm"] | None = None + + def object_to_dict(self, obj): # Intentionally untyped + raise NotImplementedError( + f"object_to_dict() is not implemented on {self.__class__.__name__}" + ) + + def get_form_response( + self, + ) -> JsonResponse | JsonResponseCreated | JsonResponseBadRequest: + if self.form_class is None: + raise NotImplementedError( + f"form_class is not set on {self.__class__.__name__}" + ) + + form = self.form_class(**self.get_form_kwargs()) + + if form.is_valid(): + return self.form_valid(form) + else: + return self.form_invalid(form) + + def get_form_kwargs(self) -> dict[str, Any]: + if not self.request.body: + raise ResponseException(ResponseBadRequest("No JSON body provided")) + + try: + data = json.loads(self.request.body) + except json.JSONDecodeError: + raise ResponseException( + JsonResponseBadRequest({"error": "Unable to parse JSON"}) + ) + + return { + "data": data, + "files": self.request.FILES, + } + + def form_valid(self, form: "BaseForm") -> JsonResponse | JsonResponseCreated: + """ + Used for PUT and PATCH requests. + Can check self.request.method if you want different behavior. + """ + object = form.save() # type: ignore + data = self.object_to_dict(object) + + if self.request.method == "POST": + return JsonResponseCreated( + data, + json_dumps_params={ + "sort_keys": True, + }, + ) + else: + return JsonResponse( + data, + json_dumps_params={ + "sort_keys": True, + }, + ) + + def form_invalid(self, form: "BaseForm") -> JsonResponseBadRequest: + return JsonResponseBadRequest( + {"message": "Invalid input", "errors": form.errors.get_json_data()}, + ) + + +class APIObjectListView(CsrfExemptViewMixin, APIBaseView): + def load_objects(self) -> None: + try: + self.objects = self.get_objects() + except ObjectDoesNotExist: + # Custom 404 with no body + raise ResponseException(ResponseNotFound()) + + if not self.objects: + # Also raise 404 if the object is None + raise ResponseException(ResponseNotFound()) + + def get_objects(self): # Intentionally untyped for subclasses to type + raise NotImplementedError( + f"get_objects() is not implemented on {self.__class__.__name__}" + ) + + def get(self) -> JsonResponseList | ResponseNotFound | ResponseBadRequest: + self.load_objects() + # TODO paginate?? + data = [self.object_to_dict(obj) for obj in self.objects] + return JsonResponseList(data) + + def post( + self, + ) -> JsonResponseCreated | ResponseNotFound | ResponseBadRequest: + self.load_objects() + return self.get_form_response() # type: ignore + + +class APIObjectView(CsrfExemptViewMixin, APIBaseView): + """Similar to a DetailView but without all of the context and template logic.""" + + def load_object(self) -> None: + try: + self.object = self.get_object() + except ObjectDoesNotExist: + # Custom 404 with no body + raise ResponseException(ResponseNotFound()) + + if not self.object: + # Also raise 404 if the object is None + raise ResponseException(ResponseNotFound()) + + def get_object(self): # Intentionally untyped for subclasses to type + """ + Get an instance of an object (typically a model instance). + + Authorization should be done here too. + """ + raise NotImplementedError( + f"get_object() is not implemented on {self.__class__.__name__}" + ) + + def get_form_kwargs(self) -> dict[str, Any]: + kwargs = super().get_form_kwargs() + kwargs["instance"] = self.object + return kwargs + + def get(self) -> JsonResponse | ResponseNotFound | ResponseBadRequest: + self.load_object() + data = self.object_to_dict(self.object) + return JsonResponse(data) + + def put(self) -> JsonResponse | ResponseNotFound | ResponseBadRequest: + self.load_object() + return self.get_form_response() + + def patch(self) -> JsonResponse | ResponseNotFound | ResponseBadRequest: + self.load_object() + return self.get_form_response() + + def delete( + self, + ) -> HttpNoContentResponse | ResponseNotFound | ResponseBadRequest: + self.load_object() + self.object.delete() + return HttpNoContentResponse() diff --git a/plain-api/pyproject.toml b/plain-api/pyproject.toml new file mode 100644 index 0000000000..66514004ab --- /dev/null +++ b/plain-api/pyproject.toml @@ -0,0 +1,27 @@ +[project] +name = "plain.api" +version = "0.0.0" +description = "API for Plain." +authors = [{name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev"}] +readme = "README.md" +requires-python = ">=3.11" +dependencies = [ + "plain<1.0.0", +] + +[tool.uv] +dev-dependencies = [ + "plain.auth<1.0.0", + "plain.pytest<1.0.0", +] + +[tool.uv.sources] +"plain.auth" = {path = "../plain-auth", editable = true} +"plain.pytest" = {path = "../plain-pytest", editable = true} + +[tool.hatch.build.targets.wheel] +packages = ["plain"] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" diff --git a/plain-api/uv.lock b/plain-api/uv.lock new file mode 100644 index 0000000000..2f27602979 --- /dev/null +++ b/plain-api/uv.lock @@ -0,0 +1,216 @@ +version = 1 +requires-python = ">=3.11" + +[[package]] +name = "click" +version = "8.1.8" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 }, +] + +[[package]] +name = "jinja2" +version = "3.1.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/af/92/b3130cbbf5591acf9ade8708c365f3238046ac7cb8ccba6e81abccb0ccff/jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb", size = 244674 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bd/0f/2ba5fbcd631e3e88689309dbe978c5769e883e4b84ebfe7da30b43275c5a/jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb", size = 134596 }, +] + +[[package]] +name = "markupsafe" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6b/28/bbf83e3f76936960b850435576dd5e67034e200469571be53f69174a2dfd/MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", size = 14353 }, + { url = "https://files.pythonhosted.org/packages/6c/30/316d194b093cde57d448a4c3209f22e3046c5bb2fb0820b118292b334be7/MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", size = 12392 }, + { url = "https://files.pythonhosted.org/packages/f2/96/9cdafba8445d3a53cae530aaf83c38ec64c4d5427d975c974084af5bc5d2/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", size = 23984 }, + { url = "https://files.pythonhosted.org/packages/f1/a4/aefb044a2cd8d7334c8a47d3fb2c9f328ac48cb349468cc31c20b539305f/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", size = 23120 }, + { url = "https://files.pythonhosted.org/packages/8d/21/5e4851379f88f3fad1de30361db501300d4f07bcad047d3cb0449fc51f8c/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", size = 23032 }, + { url = "https://files.pythonhosted.org/packages/00/7b/e92c64e079b2d0d7ddf69899c98842f3f9a60a1ae72657c89ce2655c999d/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", size = 24057 }, + { url = "https://files.pythonhosted.org/packages/f9/ac/46f960ca323037caa0a10662ef97d0a4728e890334fc156b9f9e52bcc4ca/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", size = 23359 }, + { url = "https://files.pythonhosted.org/packages/69/84/83439e16197337b8b14b6a5b9c2105fff81d42c2a7c5b58ac7b62ee2c3b1/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", size = 23306 }, + { url = "https://files.pythonhosted.org/packages/9a/34/a15aa69f01e2181ed8d2b685c0d2f6655d5cca2c4db0ddea775e631918cd/MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", size = 15094 }, + { url = "https://files.pythonhosted.org/packages/da/b8/3a3bd761922d416f3dc5d00bfbed11f66b1ab89a0c2b6e887240a30b0f6b/MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", size = 15521 }, + { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274 }, + { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348 }, + { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149 }, + { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118 }, + { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993 }, + { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178 }, + { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319 }, + { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352 }, + { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097 }, + { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601 }, + { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274 }, + { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352 }, + { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122 }, + { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085 }, + { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978 }, + { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208 }, + { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357 }, + { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344 }, + { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101 }, + { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603 }, + { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510 }, + { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486 }, + { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480 }, + { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914 }, + { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796 }, + { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473 }, + { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114 }, + { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098 }, + { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208 }, + { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739 }, +] + +[[package]] +name = "packaging" +version = "24.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, +] + +[[package]] +name = "plain" +version = "0.17.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "jinja2" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6d/dc/b8b5b47418f08e76cf028922204538ec160883f74c3c619b205c507de039/plain-0.17.0.tar.gz", hash = "sha256:2185f45711214cd406bb9640786a6bb3e3560ec39e377da9d31782d015c227b0", size = 180043 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a4/7b/fc735376f195a3921c8dffb77689f4f31b909f011f7a50dcbe250603ebd2/plain-0.17.0-py3-none-any.whl", hash = "sha256:f37ad0beab5fbbb5ff957eee341301c94c23f92eed7ecc291f928bfd8efb313f", size = 219771 }, +] + +[[package]] +name = "plain-api" +version = "0.0.0" +source = { editable = "." } +dependencies = [ + { name = "plain" }, +] + +[package.dev-dependencies] +dev = [ + { name = "plain-models" }, + { name = "plain-pytest" }, +] + +[package.metadata] +requires-dist = [{ name = "plain", specifier = "<1.0.0" }] + +[package.metadata.requires-dev] +dev = [ + { name = "plain-models", editable = "../plain-models" }, + { name = "plain-pytest", editable = "../plain-pytest" }, +] + +[[package]] +name = "plain-models" +version = "0.11.1" +source = { editable = "../plain-models" } +dependencies = [ + { name = "plain" }, + { name = "sqlparse" }, +] + +[package.metadata] +requires-dist = [ + { name = "plain", specifier = "<1.0.0" }, + { name = "sqlparse", specifier = ">=0.3.1" }, +] + +[package.metadata.requires-dev] +dev = [{ name = "plain-pytest", editable = "../plain-pytest" }] + +[[package]] +name = "plain-pytest" +version = "0.3.1" +source = { editable = "../plain-pytest" } +dependencies = [ + { name = "click" }, + { name = "plain" }, + { name = "pytest" }, + { name = "python-dotenv" }, +] + +[package.metadata] +requires-dist = [ + { name = "click", specifier = ">=8.0.0" }, + { name = "plain", specifier = "<1.0.0" }, + { name = "pytest", specifier = ">=7.0.0" }, + { name = "python-dotenv", specifier = "~=1.0.0" }, +] + +[[package]] +name = "pluggy" +version = "1.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, +] + +[[package]] +name = "pytest" +version = "8.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/05/35/30e0d83068951d90a01852cb1cef56e5d8a09d20c7f511634cc2f7e0372a/pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761", size = 1445919 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/92/76a1c94d3afee238333bc0a42b82935dd8f9cf8ce9e336ff87ee14d9e1cf/pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", size = 343083 }, +] + +[[package]] +name = "python-dotenv" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bc/57/e84d88dfe0aec03b7a2d4327012c1627ab5f03652216c63d49846d7a6c58/python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca", size = 39115 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6a/3e/b68c118422ec867fa7ab88444e1274aa40681c606d59ac27de5a5588f082/python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a", size = 19863 }, +] + +[[package]] +name = "sqlparse" +version = "0.5.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz", hash = "sha256:09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272", size = 84999 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/5c/bfd6bd0bf979426d405cc6e71eceb8701b148b16c21d2dc3c261efc61c7b/sqlparse-0.5.3-py3-none-any.whl", hash = "sha256:cf2196ed3418f3ba5de6af7e82c694a9fbdbfecccdfc72e281548517081f16ca", size = 44415 }, +]