Python OOP programming application

insert image description here



I. Introduction

Python OOP programming refers to the use of Object-Oriented Programming (OOP) to write Python code. Object-oriented programming is a programming paradigm that combines data and methods of manipulating data into an object, and realizes the function of the program through the interaction between objects.
In Python, you can use classes (class) to define the properties and methods of objects. A class is a custom data type that can contain multiple attributes and methods to describe the characteristics and behavior of an object. Objects defined by a class can be used in a program by creating an instance of the class.
The main idea of ​​object-oriented programming is to encapsulate the data in the program and the method of manipulating the data in an object, so as to realize the abstraction and encapsulation of data. This can make the program more modular, maintainable and extensible, while also improving code reusability and readability.
Some concepts commonly used in Python OOP programming include:

  • Class: A template used to define the properties and methods of an object.
  • Object: An instance of a class that contains the properties and methods defined by the class.
  • Attribute (attribute): The data member of the object, which is used to describe the characteristics of the object.
  • Method: A function member of an object that describes the behavior of the object.
  • Inheritance: A mechanism for creating new classes and inheriting properties and methods from existing classes.
  • polymorphism: A mechanism that allows different objects to respond differently to the same message.

It should be noted that although Python supports object-oriented programming, not all Python code needs to be implemented using object-oriented programming. In actual programming, the appropriate programming paradigm should be selected according to specific needs and scenarios.

Project source code: oop_app

2. Bill application

18.png
It is divided into three categories: roommate, bill, and PDF report, which are related to each other.

3. Drawing application

1.png

Drawing applications are divided into canvas, rectangle, and square categories. Through Image.fromarray, the rgb value in the 3-dimensional array can be converted into a pixel image.

4. Image search

Welcome to Kivy — Kivy 2.2.1 documentation

Kivy is a Python framework for creating cross-platform user interfaces (User Interface, UI for short). It allows developers to use the Python language to create applications with rich interactivity and visual effects, and supports advanced features such as multi-touch, gesture recognition, and animation effects.
Key features of Kivy include:

  • Cross-platform: Kivy can run on multiple platforms, including Windows, macOS, Linux, Android, iOS, and more.
  • Open Source: Kivy is an open source framework, free to use and modify.
  • Pythonic: Kivy's API design conforms to the style and habits of Python, making it easy to learn and use.
  • Responsive layout: Kivy uses a declarative language called Kv language to define the user interface, supporting adaptive layout and responsive design.
  • Multi-touch: Kivy supports multi-touch and gesture recognition to create richly interactive applications.
  • Animation effects: Kivy supports a variety of animation effects to create applications with smooth animations.
  • Extensibility: Kivy can extend its functionality through plug-ins and extensions, such as supporting various input devices, audio and video processing, and more.

Application scenarios of Kivy include game development, mobile application development, embedded system development, etc. If you want to use Python to create rich interactive and visual applications, Kivy is a good choice.

2.png

The .kv file is equivalent to the front-end layout style component, and it should be placed under the same directory as the main program.

4. Camera

The Best File Uploader & Upload API - Filestack

Filestack is a cloud file processing service that allows developers to easily upload files to the cloud and perform various file processing operations such as conversion, cropping, compression, watermarking, etc. Filestack supports a variety of file types and cloud storage services, including Amazon S3, Google Cloud Storage, Azure Blob Storage, and more.

This application is divided into three categories: camera shooting, screenshot generation, and online image link generation

6. Calorie calculator

timeanddate.com

A temperature class, calorie class, the temperature is crawled through the html of the above website (simple crawler).

7. Email automation

# 中国国内现在注册不了google,无法通过代码接入google
# https://learnku.com/python/t/47406

Disposable email service

Just need a news category

8. Instant Dictionary

JustPy

JustPy is a Python framework for building web applications that uses the Python language and JavaScript libraries to create dynamic web pages. JustPy's design goal is to make web development easy, fast and fun, while providing power and flexibility.
Key features of JustPy include:

  • Ease of use: JustPy's API design is easy to use, allowing developers to get started quickly and build high-quality web applications.
  • High performance: JustPy uses an asynchronous programming model and WebSockets technology to implement high-performance web applications.
  • Interactivity: JustPy supports real-time data updates and an interactive user interface, enabling the creation of richly interactive Web applications.
  • Extensibility: JustPy supports the use of Python and JavaScript libraries to extend its functionality to meet various needs.

JustPy works by converting Python code to JavaScript code and executing it in the browser. In this way, developers can use the Python language to write web applications without having to learn the JavaScript language. At the same time, JustPy also provides some built-in JavaScript libraries, which can easily implement various common Web functions, such as charts, forms, maps, etc.
In short, JustPy is a powerful and easy-to-use Python web framework that can help developers quickly build high-quality web applications.

JustPy comes with Tailwind CSS. In JustPy, you can use Tailwind CSS to quickly create beautiful web pages. JustPy integrates Tailwind CSS into its framework, making it possible to use Tailwind CSS classes for styling directly in Python code.

3.png

Quasar is an open source UI component library and toolset based on Vue.js, designed to help developers quickly build high-quality web applications and mobile applications. Quasar provides a large number of UI components and tools, including layouts, forms, navigation, dialogs, notifications, icons, animations, etc., which can help developers quickly build beautiful and responsive user interfaces.
Quasar also provides some useful tools, such as CLI tools, packaging tools, code generators, etc., which can help developers manage and build applications more easily. Quasar also supports a variety of build targets, including web applications, mobile applications, desktop applications, etc., to meet the needs of different platforms and devices.
Quasar features include:

  • Multiple build targets: Support multiple build targets such as web applications, mobile applications, and desktop applications.
  • Multiple themes: Multiple themes and color schemes are available to easily customize the appearance of the application.
  • Multilingual Support: Support for multiple languages ​​and internationalization makes it easy to create multilingual applications.
  • A large number of components and tools: Provides a large number of UI components and tools that can help developers quickly build applications.
  • Simple and easy to use: Use a simple and easy-to-learn API to get started quickly and improve development efficiency.

In short, Quasar is an open source UI component library and toolset based on Vue.js, which provides a large number of UI components and tools to help developers quickly build high-quality web applications and mobile applications.

Guess you like

Origin blog.csdn.net/qq_53673551/article/details/132270460