Create a Rest API using FAST API (example without database connection)

Create a Rest API using FAST API (example without database connection)

Tiempo de lectura: 2 minutos Reading time: 3 minutes In this tutorial, I will show you how to create a REST API using FastAPI. FastAPI is a modern and fast web framework for building APIs with Python 3.6+ based on the ASGI standard and with the philosophy of “less code, more productivity.” Additionally, FastAPI provides interactive and user-friendly automatic documentation, … Read more

Send email using FAST API with fastapi_mail

Send email using FAST API with fastapi_mail

Tiempo de lectura: 2 minutos Reading time: 2 minutes In this tutorial, I will show you how to send emails using FastAPI and fastapi_mail. FastAPI is a modern and fast web framework for building APIs with Python 3.6+ based on the ASGI standard and with the philosophy of “less code, more productivity.” On the other hand, fastapi_mail is a FastAPI … Read more

Return HTML with FAST API

Return HTML with FAST API

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Hello, today I’m going to show you how to return an HTML after calling an endpoint in FastAPI, the Python REST API: The first thing is to import this dependency: from fastapi.responses import HTMLResponse Once imported, we’re going to create a “get” function that, when called by the URL in … Read more

Add a Cloudflare DNS to your domain or website.

Add a Cloudflare DNS to your domain or website.

Tiempo de lectura: 2 minutos Reading time: 2 minutes Today I’m going to show you how you can add CloudFlare DNS to your website: 1. You need to register on Cloudflare or log in (https://www.cloudflare.com) 2. Now you need to go to the Websites section: 3. You need to add the domain you want to register, for example devcodelight.com You … Read more

Fixing ‘Call to undefined function imagecreatefromjpeg()’ error in PHP Docker container by importing PHP GD extension

Fixing ‘Call to undefined function imagecreatefromjpeg()’ error in PHP Docker container by importing PHP GD extension

Tiempo de lectura: < 1 minuto Reading time: < 1 minutes If we are using image processing functions in PHP, we need to install and enable PHP GD in the Docker container. To do this, we go to our Dockerfile and add the following: # syntax=docker/dockerfile:1 FROM php:7.2.5-apache RUN docker-php-ext-install mysqli RUN docker-php-ext-install pdo_mysql RUN apt-get update && \ apt-get install ... Read more

Adding PDO pdo_mysql Extension in Apache + PHP Docker Container

Adding PDO pdo_mysql Extension in Apache + PHP Docker Container

Tiempo de lectura: 2 minutos Reading time: 2 minutes Today I’m going to show you how to install the PDO pdo_mysql extension to use Codeigniter or RedBeans, etc… We have the following docker-compose.yml file: version: “3.1” services: miservicio_mariadb: image: mariadb container_name: mariadb_container env_file: – ./Dockerfile/mysql.env environment: MYSQL_DATABASE: “db_prueba” MYSQL_USER: “user_prueba” MYSQL_PASSWORD: “pass_mysql” MYSQL_ROOT_PASSWORD: “contra@prueba” volumes: – ./config/mariadb:/var/lib/mysql expose: – 3306 … Read more

Flutter – Structure of an API POST Call

Flutter – Structure of an API POST Call

Tiempo de lectura: < 1 minuto Reading time: < 1 minutes The structure for making a call from Flutter to an API and sending parameters to receive data is as follows: First, we declare and initialize a variable with the API route, in this case, I call it uri: final uri = 'https://name/api/route'; Then, I declare the headers, content-type: final headers ... Read more

Flutter- structure call API -GET

Flutter- structure call API -GET

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute The structure to make an API call and retrieve data in Flutter is as follows: First, declare and initialize a variable with the API endpoint, in this case, I’ll call it `uri`: final uri = ‘https://example.com/api’; Next, declare the headers, specifically the `Content-Type`: final headers = { ‘Content-Type’: ‘application/json’, }; … Read more

Error compiling a Flutter application with API connection

Error compiling a Flutter application with API connection

Tiempo de lectura: < 1 minuto html Copy code Reading time: < 1 minute When trying to run an application that makes an API call from Flutter, the following error occurs: Error: Cannot run with sound null safety, because the following dependenciesdon’t support null safety: package:http package:http_parser To fix this error, I followed these steps: First, in the Android Studio menu … Read more

Fixing error Message: mkdir(): Invalid path Session_files_driver in Codeigniter using Docker

Fixing error Message: mkdir(): Invalid path Session_files_driver in Codeigniter using Docker

Tiempo de lectura: < 1 minuto Reading time: < 1 minute In this post, we are going to solve an error related to sessions: Severity: Warning Message: mkdir(): Invalid path Filename: drivers/Session_files_driver.php Line Number: 136 Backtrace: File: /var/www/html/application/controllers/Home.php Line: 5 Function: __construct File: /var/www/html/index.php Line: 315 Function: require_once First, open application/config. Edit config.php and go to the line of the $config['sess_save_path'] ... Read more