python 创意项目_针对python开发人员的10个很棒的python项目创意

python 创意项目

The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code — not in reams of trivial code that bores the reader to death.


- Guido van Rossum

-Guido van Rossum

Python is one of the most used programming languages in the world, and that can be contributed to its general-purpose nature, which makes it a suitable candidate for various domains in the industry. With Python, you can develop programs not just for the web, but also for desktop and command-line. Python can be suitable for programmers of varying skill levels, right from the students to intermediate developers, to experts and professionals. But every programming language requires constant learning, and its the same case with Python.

Python是世界上使用最广泛的编程语言之一,并且可以为其通用性质做出贡献,这使其成为该行业各个领域的合适人选。 使用Python,您不仅可以为网络开发程序,还可以为桌面和命令行开发程序。 Python可以适合各种技能水平的程序员,从学生到中级开发人员,再到专家和专业人士。 但是每种编程语言都需要不断学习,Python也是如此。

If you truly want to get in-depth practical knowledge, there is no better way to get your hands dirty with Python than to undertake some cool projects that will not only keep you occupied in your free time but will also teach you how to get more out of Python.


你知道吗? (Did You Know?)

According to Stackoverflow, Python is the most preferred language which means that the majority of developers use python.


选择项目平台 (Choosing a Project Platform)

Python can be a very versatile programming language in the right hands, and you can build many nifty programs with it to strengthen your command over the language. It is of utmost importance to have more exposure to practical knowledge than theoretical, especially when it comes to learning programming languages, such as Python.

Python可以说是一门非常通用的编程语言,您可以用它构建许多漂亮的程序来增强对该语言的控制。 与理论相比,拥有更多的实践知识至关重要,尤其是在学习编程语言(例如Python)时。

But before we dive into the fun projects we have store for you, you must decide which platform you’re going to be working on. The platforms for the projects mentioned in this article can be categorized into three categories listed below:

但是在我们深入研究我们为您存储的有趣项目之前,您必须确定要在哪个平台上工作。 本文提到的项目的平台可以分为以下三类

网站 (Web)

Building a web application allows you and everyone else to access it from anywhere via the internet. For that, you would need to work on the front-end, the visual part, and the back-end of the application, where the business logic is implemented. Tools & Frameworks such as Django, Flask, and Web2Py are some of the many options you can use for this.

构建Web应用程序使您和其他所有人都可以通过Internet从任何地方访问它。 为此,您需要在实现业务逻辑的应用程序的前端,可视部分和后端进行工作。 Django FlaskWeb2Py工具和框架是您可以使用的许多选项中的一部分。

桌面GUI (Desktop GUI)

Desktop applications are also very commonly used and cater to a sizable chunk of users. When it comes to building desktop applications, Python makes it very easy for you to develop one using its PySimpleGUI package, which allows you to build all the necessary elements using Python. The framework PyQt5 also offers advanced GUI building elements but has a steeper learning curve.

桌面应用程序也非常常用,可以满足相当大的用户群。 在构建桌面应用程序时,Python使您可以使用其PySimpleGUI软件包轻松开发一个,该软件包允许您使用Python构建所有必要的元素。 PyQt5框架还提供了高级GUI构建元素,但学习曲线更陡峭。

命令行 (Command-Line)

Command-line programs work only in console windows and have no GUI at all. The user interaction takes place via commands and it is the oldest method of interacting with programs but don’t mistake its lack of GUI for its lack of usefulness. Hundreds of top enterprises depend on command-line programs to perform their daily business activities. To build command-line programs, you can use tools such as docopt, Python Fire, plac, and cliff.

命令行程序仅在控制台窗口中工作,根本没有GUI。 用户交互是通过命令进行的,它是与程序进行交互的最古老的方法,但不要因为缺乏实用性而将其缺少GUI视为错误。 数以百计的顶级企业依靠命令行程序执行日常业务活动。 要构建命令行程序,您可以使用诸如docopt之类的工具, Python Fire plac 悬崖

“Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we’re looking for more people with skills in this language.”

“ Python从一开始就一直是Google的重要组成部分,并且随着系统的发展和发展而一直存在。 如今,数十名Google工程师正在使用Python,我们正在寻找更多使用这种语言的人。”

- Peter Norvig, director of search quality at Google, Inc.

-彼得·诺维格(Peter Norvig), Google,Inc.的搜索质量总监

针对Python开发人员的Python项目创意 (Python Project Ideas for Python Developers)

If you have made up your mind about the platform you’re going to use, let’s jump straight into the projects. Mentioned below are some fun projects addressed towards developers of all skill levels that will play a crucial role in taking their skills and confidence with Python to the next level.

如果您已决定要使用的平台,那么让我们直接进入项目。 下面提到的是针对所有技能水平的开发人员的一些有趣的项目,这些项目将在将其对Python的技能和信心提升到更高水平方面发挥关键作用。

1.内容汇总器 (1. Content Aggregator)

content aggregator tool
Photo by Obi Onyeador on Unsplash
Obi OnyeadorUnsplash上的 照片

The internet is a prime source of information for millions of people who are always looking for something online. For those looking for bulk information about a specific topic can save time using a content aggregator.

互联网是数百万人一直在线寻找信息的主要信息来源。 对于那些寻找有关特定主题的大量信息的人 ,可以使用内容聚合器节省时间。

A content aggregator is a tool that gathers and provides information about a topic from a bulk of websites in one place. To make one, you can take the help of the requests library for handling the HTTP requests and BeautifulSoup for parsing and scraping the required information, along with a database to save the collected information.

内容聚合器是一种工具,可从一个地方的大量网站收集并提供有关主题的信息。 首先,您可以利用请求库来处理HTTP请求,可以利用BeautifulSoup解析和抓取所需信息 ,还可以利用数据库来保存收集的信息。

Examples of Content Aggregators:


2. URL缩短器 (2. URL Shortener)

URLs are the primary source of navigation to any resource on the internet, be it a webpage or a file, and, sometimes, some of these URLs can be quite large with weird characters. URL shorteners play an important role in reducing the characters in these URLs and making them easier to remember and work with.

URL是导航到Internet上任何资源(无论是网页还是文件)的主要来源,有时,其中一些URL可能很大,带有奇怪的字符。 URL缩短器在减少这些URL中的字符并使其易于记忆和使用方面起着重要作用。

The idea behind making a URL shortener is to use the random and string modules for generating a new short URL from the entered long URL. Once you’ve done that, you would need to map the long URLs and short URLs and store them in a database to allow users to use them in the future.

制作URL缩短器的思想是使用random和string模块从输入的长URL生成新的短URL。 完成此操作后,您需要映射长URL和短URL并将它们存储在数据库中,以允许用户将来使用它们。

Examples of Content Aggregators —


Here is the link to join the course for FREE: —


3.文件重命名工具 (3. File Renaming Tool)

File Renaming tool created with Python
Photo by Brett Sayles from Pexels
PexelsBrett Sayles

If your job requires you to manage a large number of files frequently, then using a file renaming tool can save you a major chunk of your time. What it essentially does is that it renames hundreds of files using a defined initial identifier, which could be defined in the code or asked from the user.

如果您的工作要求您经常管理大量文件,那么使用文件重命名工具可以节省大量时间。 它的主要作用是使用定义的初始标识符重命名数百个文件,该标识符可以在代码中定义,也可以向用户询问。

To make this happen, you could use the libraries such as sys, shutil, and os in Python to rename the files instantaneously. To implement the option to add a custom initial identifier to the files, you can use the regex library to match the naming patterns of the files.

为此,您可以使用sysshutil python中的os可以立即重命名文件。 要实现向文件添加自定义初始标识符的选项,可以使用 regex库以匹配文件的命名模式。

Examples of Bulk File Rename Tools —


4.目录树生成器 (4. Directory Tree Generator)

A directory tree generator is a tool that you would use in conditions where you’d like to visualize all the directories in your system and identify the relationship between them. What a directory tree essentially indicates is which directory is the parent directory and which ones are its sub-directories. A tool like this would be helpful if you work with a lot of directories, and you want to analyze their positioning. To build this, you can use the os library to list the files and directories along with the docopt framework.

目录树生成器是一种工具,可在需要可视化系统中所有目录并确定它们之间关系的情况下使用。 目录树本质上指示的是哪个目录是父目录,哪些是其子目录。 如果您使用大量目录,并且要分析其位置,则类似这样的工具将非常有用。 要构建它,您可以使用os库列出文件和目录以及docopt框架

Examples of Directory Tree Generators —


5. MP3播放器 (5. MP3 Player)

mp3 player built by Python
Photo by Mildly Useful on Unsplash
图片来自 Mildly,Unsplash 有用

If you love listening to music, you’d be surprised to know that you can build a music player with Python. You can build an mp3 player with the graphical interface with a basic set of controls for playback, and even display the integrated media information such as artist, media length, album name, and more.

如果您喜欢听音乐,您会惊讶地发现您可以使用Python构建音乐播放器。 您可以使用图形界面构建mp3播放器,并带有一组用于播放的基本控件,甚至可以显示集成的媒体信息,例如艺术家,媒体长度,专辑名称等。

You can also have the option to navigate to folders and search for mp3 files for your music player. To make working with media files in Python easier, you can use the simpleaudio, pymedia, and pygame libraries.

您还可以选择导航到文件夹并搜索音乐播放器的mp3文件。 为了简化使用Python中的媒体文件的处理,您可以使用 simpleaudiopymediapygame的图书馆。

Examples of Content Aggregators —


6. 井字游戏 (6. Tic Tac Toe)

Tic Tac Toe is a classic game we’re sure each of you is familiar with. It’s a simple and fun game and requires only two players. The goal is to create an uninterrupted horizontal, vertical, or diagonal line of either three Xs or Os on a 3x3 grid, and whoever does it first is the winner of the game. A project like this can use Python’s pygame library, which comes with all the required graphics and the audio to get you started with building something like this.

井字游戏是一款经典游戏,我们相信你们每个人都熟悉。 这是一款简单有趣的游戏,仅需两名玩家即可。 目标是在3x3网格上创建由三个X或O组成的不间断的水平,垂直或对角线,谁先做谁就是游戏的赢家。 这样的项目可以使用Python的pygame库 ,该随附所有必需的图形和音频,以帮助您开始构建类似的内容。

Tic tac toe
OpenClipart-Vectors from OpenClipart-VectorsPixabay Pixabay上发布

Here are a few tutorials you can try:


More Fun Python projects for game dev:


7.测验申请 (7. Quiz Application)

Another popular and fun project you can build using Python is a quiz application. A popular example of this is Kahoot, which is famous for making learning a fun activity among the students. The application presents a series of questions with multiple options and asks the user to select an option and later on, the application reveals the correct options.

您可以使用Python构建的另一个受欢迎且有趣的项目是测验应用程序。 一个流行的例子是Kahoot它以使学习成为学生的一项有趣活动而闻名。 该应用程序提出了一系列带有多个选项的问题,并要求用户选择一个选项,随后,该应用程序将显示正确的选项。

As the developer, you can also create the functionality to add any desired question with the answers to be used in the quiz. To make a quiz application, you would need to use a database to store all the questions, options, the correct answers, and the user scores.

作为开发人员,您还可以创建功能以添加任何所需的问题以及测验中要使用的答案。 要创建测验应用程序,您需要使用数据库来存储所有问题,选项,正确答案和用户分数。

Examples of Content Aggregators —


Read about the Best Python IDEs and Code Editors —

了解最佳的Python IDE和代码编辑器-

8. 计算器 (8. Calculator)

Developing a calculator with Python
Photo by Eduardo Rosas from Pexels
PexelsEduardo Rosas

Of course, no one should miss the age-old idea of developing a calculator while learning a new programming language, even if it is just for fun. We’re sure all of you know what a calculator is, and if you have already given it a shot, you can try to enhance it with a better GUI that brings it closer to the modern versions that come with operating systems today. To make that happen, you can use the tkinter package to add GUI elements to your project.

当然,即使只是为了好玩,也没有人会在学习一种新的编程语言时就怀念开发计算器的古老想法。 我们确定所有人都知道计算器是什么,并且如果您已经尝试过它,则可以尝试使用更好的GUI来增强它使其更接近于当今操作系统随附的现代版本 。 为此,您可以使用tkinter将GUI元素添加到项目中。

9. 构建一个虚拟助手 (9. Build a Virtual Assistant)

Build a virtual assistant with Python
Photo by BENCE BOROS on Unsplash
BENCE BOROSUnsplash拍摄的照片

Almost every smartphone nowadays comes with its own variant of a smart assistant that takes commands from you either via voice or by text and manages your calls, notes, books a cab, and much more. Some examples of this are Google Assistant, Alexa, Cortana, and Siri. If you’re wondering what goes into making something like this, you can use packages such as pyaudio, SpeechRecognition, gTTS, and Wikipedia. The goal here is to record the audio, convert the audio to text, process the command, and make the program act according to the command.

如今,几乎每个智能手机都带有自己的智能助手变体,该智能助手可以通过语音或文本从您那里接收命令,并管理您的通话,备忘,预订出租车等。 Google Assistant,Alexa,Cortana和Siri就是其中的一些示例。 如果你想知道什么都是这样的事情,你可以用包如pyaudio 语音识别 腹围, 维基百科 。 这里的目标是记录音频,将音频转换为文本,处理命令,并使程序根据命令运行。

Here is the link to join the course for FREE —


10.货币转换器 (10. Currency Converter)

As the name suggests, this project includes building a currency converter that allows you to input the desired value in the base currency and returns the converted value in the target currency. A good practice is to code the ability to get updated conversion rates from the internet for more accurate conversions. For this too, you can use the tkinter package to build the GUI.

顾名思义,该项目包括构建一个货币转换器,该货币转换器允许您以基础货币输入所需的值,并以目标货币返回转换后的值。 良好的做法是对从互联网获取更新的转化率的功能进行编码,以实现更准确的转化​​。 同样,您也可以使用tkinter包来构建GUI。

需要构建更多的Python项目构想- (More Python Project Ideas to Build—)

结论 (Conclusion)

Concluding our list of a handful of interesting ideas and projects you can build using Python, we can say that Python can be a very useful programming language to develop applications of all sorts and scales. Furthermore, the packages provided by Python offer immense value to the developers in simplifying the development process to a great extent. To wrap things up, we would like to say that the potential with Python is limitless, and the only thing that you might be missing could be the right idea.

总结了我们可以使用Python构建的一些有趣的想法和项目的清单,可以说Python是一种非常有用的编程语言,可用于开发各种规模的应用程序。 此外,Python提供的软件包在很大程度上简化了开发过程的过程中为开发人员提供了巨大的价值。 总结一下,我们想说Python的潜力是无限的,而您唯一可能缺少的就是正确的想法。

If you have more suggestions or ideas, we’d love to hear about them.


更有趣的读物 (More Interesting Readings)

I hope you’ve found this article useful! Below are some interesting readings hope you like them too-

希望本文对您有所帮助! 以下是一些有趣的读物,希望您也喜欢它们-

About Author


Claire D. is a Content Crafter and Marketer at Digitalogy — a tech sourcing and custom matchmaking marketplace that connects people with pre-screened & top-notch developers and designers based on their specific needs across the globe. Connect with Digitalogy on Linkedin, Twitter, Instagram.

克莱尔·D Digitalogy 的Content Crafter and Marketinger,这 是一个技术采购和自定义对接市场,根据全球各地的特定需求,将人们与预先筛选和一流的开发人员和设计师联系起来。 Linkedin Twitter Instagram Digitalogy联系


python 创意项目

  • 1
  • 6
    觉得还不错? 一键收藏
  • 0
### 回答1: 使用 Linux 和 Python 创建虚拟环境的代码很简单,首先需要打开终端,然后输入相应的命令,如下所示:python -m venv [虚拟环境名称],它将在当前目录中创建一个名为[虚拟环境名称]的文件夹,其中包含所有所需的文件。 ### 回答2: Linux和Python都是开源的软件工具,它们的共同特点是灵活性和自由度高。Linux操作系统提供了强大的命令行工具,并且对于软件开发和创新非常友好。Python则是一种易于学习和使用的编程语言,被广泛应用于各种领域的开发。 在Linux中,创新虚拟环境是一种常见的做法,可以用来隔离和管理不同的应用、包、库和依赖项。这样,我们可以在同一台机器上同时安装和运行多个不同版本的Python,并且每个环境可以有自己独立的库和依赖项。这对于开发和测试新的软件项目非常有用,因为它可以确保项目的运行环境是干净、一致和可重复的。 在Linux中,创建一个新的Python虚拟环境通常使用venv工具。首先,我们需要安装venv工具,可以通过以下命令安装: ``` $ sudo apt-get install python3-venv ``` 安装完成后,我们可以使用以下命令创建一个新的虚拟环境: ``` $ python3 -m venv myenv ``` 上述命令将在当前目录创建一个名为myenv的新虚拟环境。我们可以使用以下命令激活该环境: ``` $ source myenv/bin/activate ``` 激活后,我们的命令行提示符将变为类似于`(myenv) $`的形式,表示我们当前处于虚拟环境中。在这个环境中,我们可以安装和运行特定版本的Python包和脚本,而不会影响到其他环境。 当我们完成工作后,可以使用以下命令退出虚拟环境: ``` $ deactivate ``` 以上就是在Linux中使用Python创建创新虚拟环境的常见步骤和代码。创新虚拟环境可以提供一个干净、隔离和可重复的环境,帮助开发者更好地进行软件开发和创新。 ### 回答3: 在Linux系统上,可以使用Python的虚拟环境来创建隔离的、独立的Python环境,以便于开发和测试不同的Python项目。以下是使用Linux命令行创建和管理Python虚拟环境的代码示例: 1. 安装Python虚拟环境工具: ```bash sudo apt update sudo apt install python3-venv ``` 2. 创建虚拟环境: ```bash python3 -m venv myenv ``` 该命令会在当前目录下创建名为“myenv”的虚拟环境。 3. 激活虚拟环境: ```bash source myenv/bin/activate ``` 激活后,Shell提示符会显示虚拟环境名称,表示当前正在使用该环境。 4. 安装Python包: ```bash pip install package_name ``` 可以使用pip命令安装所需的Python包,这些包将仅在当前虚拟环境中可用。 5. 退出虚拟环境: ```bash deactivate ``` 使用该命令可以退出当前的虚拟环境,回到系统默认的Python环境。 通过创建和管理Python虚拟环境,可以在同一系统上同时运行多个不同版本的Python,或者在同一版本上运行不同的项目,并且彼此之间不会相互影响。这在开发和测试过程中非常有用,并且可以提高项目的可维护性和稳定性。


  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助




当前余额3.43前往充值 >
领取后你会自动成为博主和红包主的粉丝 规则
钱包余额 0