Python

Python is a flexible and versatile programming language that can be leveraged for many use cases, with strengths in scripting, automation, data analysis, machine learning, and back-end development. It is a great tool for both new learners and experienced developers alike.

featured tutorialHow To Make a Web Application Using Flask in Python 3
Flask is a small and lightweight Python web framework that provides useful tools and features making creating web app...

Abdelhadi Dyouri • Published on April 16, 2020 · Updated on April 16, 2020

featured tutorialHow To Use Break, Continue, and Pass Statements when Working with Loops in Python 3
In this tutorial, we will go over the break, continue, and pass statements in Python, which will allow you to use for...

Lisa Tagliaferri • Published on January 6, 2017 · Updated on December 15, 2021

featured tutorialHow To Write Your First Python 3 Program
This tutorial will walk you through writing a “Hello, World” program in Python 3. The “Hello, World!” program is a cl...

Lisa Tagliaferri • Published on September 14, 2016 · Updated on August 20, 2021

Subscribe to Python
Get notified when new articles on Python are published.
    All
  • 20 Results
    Newest
    All time
    English
    • Tutorial

      How To Use Many-to-Many Database Relationships with Flask-SQLAlchemy

      In this tutorial, you’ll modify an application built using Flask and Flask-SQLAlchemy by adding a many-to-many relationship to it. You’ll have a relationship between posts and tags, where each blog post can have sever...
      0 days agoBy Abdelhadi DyouriDatabasesDevelopmentFlaskPythonPython Frameworks
    • Question

      build.cmd for Deploying Python to Functions

      When trying to deploy the sample python application “digitalocean/sample-functions-python-jokes” to Functions on a Windows workstation, doctl looking for a build.cmd. Is there a sample build.cmd to installation depend...
      No answers yet1 day agoBy Horace YipDigitalOcean FunctionsPython
    • Tutorial

      How To Set Up Jupyter Notebook with Python 3 on Ubuntu 18.04

      This tutorial will walk you through setting up Jupyter Notebook to run from an Ubuntu 18.04 server, as well as teach you how to connect to and use the notebook. By the end of this guide, you will be able to run Python...
      13 days agoBy Lisa TagliaferriPythonData AnalysisDevelopmentUbuntu 18.04
    • Question

      How to set cookies with digitalocean functions?

      How to insert Set-Cookie header into function response headers?
      No answers yet18 days agoBy Igor4erDigitalOcean FunctionsPython
    • Question

      In Functions, how can I know the http method?

      I’m using Python to develop a API Restful and I want diferents behaviors for each http method. How can I know the http method?
      1 answer24 days agoBy Salomão PrestupaDigitalOcean FunctionsPython
    • Question

      Can I deploy to the App Platform without a Dockerfile?

      I have no dockerfile in my repo, and when I deploy to the AP I get the error: ! Invalid dockerfile_path, no such file exists in the git repository. I don’t want to deploy a Docker container, is that possible at all? H...
      1 answer1 month agoBy BubblyCeruleanMantaRayAPIDigitalOcean App PlatformPython
    • Question

      How to login as root in App Platform console

      I want to install python locale languages so that my app will work with local language. The problem is that when i try to install it, console says that i have to login as a root. I tried to login with “sudo root” but ...
      2 answers1 month agoBy SmallLapisAnglerDigitalOcean App PlatformPython
    • Question

      What code needed for App Platform "Worker"

      I’m trying to make code that will run one method in my App Platform Django project every 15 minutes. According to the D.O. docs a Worker resource can do this. However, after scouring the internet for hours I can’t fin...
      No answers yet1 month agoBy robbarberApplicationsDigitalOcean App PlatformDjangoInfrastructurePython
    • Tutorial

      How To Install the Django Web Framework on Ubuntu 22.04

      Introduction Django is a full-featured Python web framework for developing dynamic websites and applications. Using Django, you can quickly create Python web applications and rely on the framework to do a good deal of...
      1 month agoBy Brian Boucheron, Jamon CamissoPythonUbuntuDjangoPython FrameworksUbuntu 22.04
    • Tutorial

      How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 22.04

      In this guide, you will build a Python application using the Flask microframework on Ubuntu 22.04. The majority of this tutorial is about how to set up the Gunicorn application server to run the application and how to...
      1 month agoBy Jamon CamissoPythonUbuntuNginxPython FrameworksUbuntu 22.04
    • Tutorial

      How to Use One-to-Many Database Relationships with Flask-SQLAlchemy

      In this tutorial, you’ll build a small blogging system that demonstrates how to build one-to-many relationships using the Flask-SQLAlchemy extension. You’ll have a relationship between posts and comments, where each b...
      2 months agoBy Abdelhadi DyouriDatabasesPythonDevelopmentFlaskPython Frameworks
    • Tutorial

      How To Install the Anaconda Python Distribution on Ubuntu 22.04

      This tutorial will guide you through installing the Python 3 version of Anaconda on an Ubuntu 22.04 server. Anaconda is an open-source package manager, environment manager, and distribution of the Python and R program...
      2 months agoBy Lisa Tagliaferri, Tony TranData AnalysisDevelopmentMachine LearningPythonUbuntu 22.04
    • Tutorial

      How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 22.04

      Django is a powerful web framework that can help you get your Python application or website off the ground. Django includes a simplified development server for testing your code locally, but for anything even slightly...
      2 months agoBy Erin Glass, Jamon CamissoDjangoNginxPostgreSQLPython FrameworksDatabasesPythonUbuntu
    • Tutorial

      How To Install Python 3 and Set Up a Programming Environment on Ubuntu 22.04

      This tutorial will get your Ubuntu 22.04 server set up with a Python 3 programming environment. Programming on a server has many advantages and supports collaboration across development projects. The general principle...
      2 months agoBy Alex GarnettDevelopmentPythonUbuntuUbuntu 22.04Interactive
    • Question

      How to setup channel on droplet without running into the error Cannot import ASGI_APPLICATION module

      I have been trying for the past two weeks now to host my web app on digital oceans droplet cloud server , after I had successfully uploaded all the files of my Django app to the droplet cloud server, I can’t seem to f...
      1 answer2 months agoBy GoddaDjangoPythonUbuntu 20.04
    • Question

      Upgrading to multi core

      When I upgrade to a multi-core (from 1 vCPU to 2 vCPU) do I need to upgrade anything (besides my code) to take advantage of 2 vCPU? If I simply resized my droplet without a brand new Ubuntu install, if my python singl...
      1 answer2 months agoBy CodingMonkeyApplicationsBig DataData AnalysisPostgreSQLPythonSystem ToolsUbuntu
    • Question

      Problems with sessions in django

      I have deployed my site in django in an Ubuntu droplet. I have no problem with the deployment and everything seems to be in order. However, when I want to start a session, it does not persist, therefore I do not maint...
      1 answer2 months agoBy Greg-502DeploymentDigitalOcean DropletsDjangoPythonUbuntu
    • Question

      How to receive UDP packets via a python socket in ubuntu running on digitalocean?

      I’m using a simple python socket that listens on IP 0.0.0.0 via port 65333 for incoming UDP packets. To test if the script with the socket worked, two consoles were opened in the droplet and one console ran the python...
      Accepted Answer: So I tried disabling all firewalls and checking everything once more and I still didn’t receive the UDP packets when sending from my external computer.So out of desperation, I tried out the packet sender software and ...
      2 answers2 months agoBy SwimmingGrayRayPython
    • Tutorial

      How To Install Python 3 and Set Up a Programming Environment on an Ubuntu 20.04 Server

      This tutorial will get your Ubuntu 20.04 server set up with a Python 3 programming environment. Programming on a server has many advantages and supports collaboration across development projects. The general principle...
      3 months agoBy Lisa TagliaferriPythonUbuntuUbuntu 20.04Development
    • Tutorial

      How To Build a Deep Learning Model to Predict Employee Retention Using Keras and TensorFlow

      Keras is a neural network API that is written in Python. TensorFlow is an open-source software library for machine learning. In this tutorial, you’ll build a deep learning model that will predict the probability of an...
      3 months agoBy Derrick MwitiPythonMachine LearningDevelopment