yta-fastapi-docker-web-resources 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2018 The Python Packaging Authority
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: yta-fastapi-docker-web-resources
3
+ Version: 0.0.1
4
+ Summary: Youtube Autonomous FastAPI Docker Web Resources Module
5
+ License-File: LICENSE
6
+ Author: danialcala94
7
+ Author-email: danielalcalavalera@gmail.com
8
+ Requires-Python: >=3.10,<3.14
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Dist: fastapi (>=0.136.3,<9999.0.0)
15
+ Requires-Dist: uvicorn (>=0.48.0,<9999.0.0)
16
+ Requires-Dist: yta_fastapi_docker_common (>=0.0.14,<1.0.0)
17
+ Requires-Dist: yta_web_resources (>=0.0.13,<1.0.0)
18
+ Description-Content-Type: text/markdown
19
+
20
+ # Youtube Autonomous FastAPI Docker Web Resources Module
21
+
22
+ The module that is providing the functionality related to the Web Resources that are customized and generated to be downloaded using a scraper, to be lately provided through a FastAPI that is included and isolated in a Docker container but exposed to the internal and general FastAPI.
23
+
24
+ ### Endpoints
25
+
26
+ #### GET
27
+ - `/web-resource/random`
28
+
29
+ #### POST
30
+ No hay endpoints por el momento
@@ -0,0 +1,11 @@
1
+ # Youtube Autonomous FastAPI Docker Web Resources Module
2
+
3
+ The module that is providing the functionality related to the Web Resources that are customized and generated to be downloaded using a scraper, to be lately provided through a FastAPI that is included and isolated in a Docker container but exposed to the internal and general FastAPI.
4
+
5
+ ### Endpoints
6
+
7
+ #### GET
8
+ - `/web-resource/random`
9
+
10
+ #### POST
11
+ No hay endpoints por el momento
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "yta-fastapi-docker-web-resources"
3
+ version = "0.0.1"
4
+ description = "Youtube Autonomous FastAPI Docker Web Resources Module"
5
+ authors = [
6
+ {name = "danialcala94", email = "danielalcalavalera@gmail.com"}
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.10,<3.14"
10
+
11
+ [tool.poetry.dependencies]
12
+ # Mandatory
13
+ yta_web_resources = { version = ">=0.0.13,<1.0.0", optional = false }
14
+ fastapi = { version = ">=0.136.3,<9999.0.0", optional = false }
15
+ uvicorn = { version = ">=0.48.0,<9999.0.0", optional = false }
16
+ yta_fastapi_docker_common = { version = ">=0.0.14,<1.0.0", optional = false }
17
+ # Optionalº
18
+
19
+ [tool.poetry]
20
+ packages = [{include = "yta_fastapi_docker_web_resources", from = "src"}]
21
+
22
+ [tool.poetry.group.dev.dependencies]
23
+ pytest = "^8.3.5"
24
+ yta_testing = ">=0.3.6"
25
+
26
+ [tool.pytest.ini_options]
27
+ markers = [
28
+ "mandatory: mandatory tests for release",
29
+ "additional: exhaustive and demanding tests"
30
+ ]
31
+
32
+ [build-system]
33
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
34
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,6 @@
1
+ """
2
+ The magic use of html, css and javascript to
3
+ dynamically create resources that are stored
4
+ as images, with transparency, ready to be used
5
+ in our compositions and/or videos.
6
+ """
@@ -0,0 +1,10 @@
1
+ from yta_fastapi_docker_web_resources.app.routers import router as general_router
2
+ from yta_fastapi_docker_web_resources.app.routers.web_resources import router as web_resources_router
3
+ from fastapi import FastAPI
4
+
5
+
6
+ app = FastAPI()
7
+
8
+ # Include all the routers we have
9
+ app.include_router(general_router)
10
+ app.include_router(web_resources_router)
@@ -0,0 +1,24 @@
1
+ """
2
+ Check this project to get inspiration about FastAPI:
3
+ - https://github.com/Implosiv3/render-fastapi/blob/master/render-fastapi/routers/download/__init__.py
4
+ """
5
+ from fastapi import APIRouter
6
+ from fastapi.responses import JSONResponse
7
+
8
+
9
+ PREFIX = f''
10
+
11
+ router = APIRouter(
12
+ prefix = PREFIX
13
+ )
14
+
15
+ @router.get('/check-status')
16
+ def route_check_status(
17
+ ) -> JSONResponse:
18
+ return JSONResponse(
19
+ {
20
+ 'error': False,
21
+ 'message': 'Hello World!'
22
+ },
23
+ status_code = 200
24
+ )
@@ -0,0 +1,33 @@
1
+ from yta_web_resources.web.booking import _BookingReviewImageWebResource
2
+ from fastapi import APIRouter
3
+ from fastapi.responses import Response
4
+
5
+
6
+ PREFIX = f'/web-resources'
7
+
8
+ router = APIRouter(
9
+ prefix = PREFIX
10
+ )
11
+
12
+
13
+ @router.get('/booking-review')
14
+ async def get_booking_review(
15
+ name: str,
16
+ message: str
17
+ ) -> Response:
18
+ # TODO: What about when it is not only 1 image (?)
19
+ image_bytes = _BookingReviewImageWebResource(
20
+ local_path = '.venv/Lib/site-packages/yta_web_resources/web/booking/index.html',
21
+ # local_path = 'src/yta_web_resources/web/booking/index.html',
22
+ google_drive_direct_download_url = 'https://drive.google.com/file/d/1TyAz89ZLIMB3a-fk1qaaKa2qDoVHJ8t3/view?usp=drive_link',
23
+ do_use_local_url = True,
24
+ do_use_gui = False
25
+ ).get_frame(
26
+ name = name,
27
+ text = message
28
+ )
29
+
30
+ return Response(
31
+ content = image_bytes,
32
+ media_type = 'image/png'
33
+ )