current location:Home > Technical Articles > Backend Development > Python Tutorial

  • Building a Context-Aware To-Do List with Nestjs, RAG, Prisma, and Gemini API
    Building a Context-Aware To-Do List with Nestjs, RAG, Prisma, and Gemini API
    This tutorial guides you through creating a context-aware to-do list application using Retrieval Augmented Generation (RAG). We'll leverage Google's Gemini API for text embedding, PgVector for efficient vector storage, and Prisma and NestJS to manage PostgreSQL databases. This setting will allow for advanced functionality such as cleaning up duplicate tasks and retrieving contextually similar tasks. Prerequisites Learn the basics of NestJS and Prisma. Node.js and npm installed. PostgreSQL database with PgVector extension enabled
    Python Tutorial 362 2025-01-27 18:11:09
  • [python] convert UTC to your local time with standard libs.
    [python] convert UTC to your local time with standard libs.
    Use the Python standard library to easily convert UTC time to local time This article will introduce how to use Python's standard library to convert UTC time into your local time. Just two simple steps: Create a DateTime object containing UTC time zone information. Use the ASTIMEZONE method to convert the DateTime object before. The following example is how to convert 2025-01-01T00: 00Z to your local time: From datetime import datetime From zoneinfo import zoneinfo UTC = DateTime (2025,
    Python Tutorial 671 2025-01-27 16:18:11
  • Distributed Systems: Designing Scalable Python Backends
    Distributed Systems: Designing Scalable Python Backends
    Modern web-connected systems are almost universally distributed. A distributed system comprises multiple computers or servers collaborating for optimal functionality, enabling seamless user experiences even under heavy load. Contrast this with a si
    Python Tutorial 519 2025-01-27 16:16:11
  • Understanding Python Decorators: A Beginner's Guide with Examples
    Understanding Python Decorators: A Beginner's Guide with Examples
    Python Decorators: Beginner’s Guide and Examples Python decorators are powerful and versatile tools for modifying the behavior of a function or method. They allow you to add functionality to existing code without changing its structure. This article takes an in-depth look at decorators and provides simple examples to help you understand and use them effectively. What are decorators? A decorator in Python is essentially a function that receives another function as an argument and extends or changes its behavior. Decorators are typically used to add functionality such as logging, access control, memoization, or validation to an existing function or method. Decorators in Python are applied to function definitions using the @decorator_name syntax. Decorator
    Python Tutorial 810 2025-01-27 16:12:11
  • [Python] How to convert different time zones without using pytz, dateutil
    [Python] How to convert different time zones without using pytz, dateutil
    No need for pytz and dateutil, Python natively implements date and time conversion in different time zones This article introduces how to use the datetime module and zoneinfo module in Python 3.6 and above, without the need for third-party libraries pytz and dateutil, to easily convert date and time in different time zones. Core method: Use the astimezone method of the datetime object. Brief steps: Create a datetime object containing time zone information. Convert datetime to target time zone using astimezone method. Prerequisites: Python >= 3.6 tzdata (Wind
    Python Tutorial 503 2025-01-27 16:11:13
  • Exploring Kokoro TTS Voice Synthesis on Google Colab with T4
    Exploring Kokoro TTS Voice Synthesis on Google Colab with T4
    KOKORO-82M: High-Performance Text Transfer Voice (TTS) model exploration KOKORO-82M is a high-performance TTS model that can generate high-quality audio. It supports simple text conversion, and can easily synthesize voice synthesis by retention of audio file application rights. KOKORO-82M on hugging face Starting from version 0.23, KOKORO-82M also supports Japanese. You can easily try it through the following link: [KOKORO TTS on Hugging Face Spaces] However, the tone of Japanese
    Python Tutorial 537 2025-01-27 12:12:09
  • How to Create Custom Template Tags in Django?
    How to Create Custom Template Tags in Django?
    Django template tags: simplify data display and improve code reusability In Django development, templates are used to dynamically render data into HTML pages. This article will introduce how to use Django template tags to simplify data display logic and avoid duplicating code in views. Django template basic example Let's say you have a simple course list HTML template: The corresponding view code is as follows: The view passes the course data to the template, which is ultimately displayed on the web page like this: Question: Show total number of courses Now, let's say you need to display the total number of courses on a web page. One way is to add calculation logic in the view: def course_list(request): to
    Python Tutorial 590 2025-01-27 08:10:10
  • How to disable admin editing in Django Admin Panel
    How to disable admin editing in Django Admin Panel
    Django Admin Panel: A Read-Only Approach for Data Management The Django Admin Panel offers a user-friendly interface for managing models, data, and users. Its built-in search and filtering capabilities are incredibly convenient. However, sometimes r
    Python Tutorial 1008 2025-01-27 06:12:08
  • Creating a chatbot with contextual retrieval using Cohere command-r and Streamlit
    Creating a chatbot with contextual retrieval using Cohere command-r and Streamlit
    Overview of items Chatish is an innovative StreamLit network application that shows the powerful features of using large language models (especially the Command R model of Cohere) for context retrieval. The project shows how modern artificial intelligence changes the document interaction method through intelligent, context -perceive dialogue. Architecture This application is constructed around the four main Python modules: app.py: main application entry point Chat_manager.py: Management chat interaction cohere_client.py: processing AI interaction file_handler.py: processing upload
    Python Tutorial 457 2025-01-27 06:10:09
  • A Day Weather Dashboard: How I Built A Python Project for API Integration and Cloud Storage
    A Day Weather Dashboard: How I Built A Python Project for API Integration and Cloud Storage
    This Python application, the 30-Day Weather Dashboard, efficiently retrieves weather data for multiple locations via the OpenWeather API and securely stores it in an AWS S3 bucket. This project showcases best practices in API interaction, cloud reso
    Python Tutorial 524 2025-01-27 02:18:12
  • The Power of Quantization: Shrinking GPTUnleashing Speed
    The Power of Quantization: Shrinking GPTUnleashing Speed
    Imagine taking a powerful language model like GPT-2—capable of crafting stories, answering questions, and mimicking human text—and compressing it into a leaner, faster version without gutting its capabilities. This is the promise of quantization: a
    Python Tutorial 789 2025-01-27 02:16:09
  • GenAI: Building RAG Systems with LangChain
    GenAI: Building RAG Systems with LangChain
    In the age of Generative AI, Retrieval-Augmented Generation (RAG) has emerged as a powerful approach for building intelligent, context-aware applications. RAG combines the strengths of large language models (LLMs) with efficient document retrieval te
    Python Tutorial 951 2025-01-27 02:14:12
  • Techniques for Field Validation in Django
    Techniques for Field Validation in Django
    Django form data validation is a key link in web development, ensuring that the user data collected meets application requirements. Django provides a variety of field validation methods, which this article will explain step by step. Using field parameters When defining Django form fields, you can usually specify validation rules directly through field parameters. For example, make sure the first_name field has a maximum length of 100 characters. Since it is a CharField, the max_length parameter can be used: from django import forms class PersonalInfo(forms.Form): first_name = fo
    Python Tutorial 671 2025-01-27 00:15:09
  • Blog automation with CrewAI
    Blog automation with CrewAI
    CrewAI, an open-source framework, empowers the creation and management of autonomous AI agent teams. This innovative tool facilitates the coordination of role-playing and autonomous AI agents to achieve complex objectives. Agents within the CrewAI
    Python Tutorial 946 2025-01-27 00:13:08
  • Implementing the Active Record Pattern in Python with SQLModel
    Implementing the Active Record Pattern in Python with SQLModel
    Python developers often miss Active Record's elegant database interaction when migrating from Ruby on Rails to Python. While Python's SQLAlchemy (and therefore SQLModel) takes a different approach by default, we can implement a similar pattern to bring the convenience of Rails-style models to Python applications while maintaining type safety and following Python best practices. Active Record mode The Active Record pattern (popularized by Ruby on Rails) treats database records as objects with methods for database operations. It eliminates the need to use a separate repository class
    Python Tutorial 481 2025-01-27 00:12:09

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28