Python: Development platform
Prepare your development platform for a smooth and productive experience
👋 Welcome to the Stackhero documentation!
Stackhero offers a ready-to-use Python cloud solution designed to simplify your deployments:
- Deploy your application to production in just seconds with a simple
git push.- Use your own domain name, with automatic HTTPS certificate setup for secure connections managed for you.
- Take advantage of automatic backups, one-click updates, and predictable pricing, so you can focus on your code instead of infrastructure management.
- Benefit from high performance and security on a private, dedicated infrastructure. Your environment is isolated and protected.
Save time and streamline your workflow: your code can be up and running with Stackhero's Python cloud hosting in just 5 minutes.
A well-prepared development platform streamlines your workflow and boosts productivity.
This guide presents two effective ways to develop in Python: using a remote, ready-to-code environment or setting up your environment locally on your computer. You will also learn how to install Python with asdf and create a new Python project from scratch.
How to develop: locally or remotely
You have two main options for Python development: running everything on your own device, or using a cloud-based workspace such as Code-Hero. Each method has clear advantages. Choose the one that best fits your workflow and needs.
Local development allows you to work entirely offline. This is useful if your internet access is limited or if you want to develop without network interruptions. Setting up your environment takes a bit more time, and you are responsible for updates, backups, and system maintenance. Your work is limited to your current device, which can restrict flexibility and performance.
Remote development with a platform like Code-Hero offers an environment that is ready to use immediately. You benefit from a suite of pre-installed tools, a familiar interface, and cloud resources that often outperform your local hardware. You can work from any device with an internet connection, and your workspace is always backed up and secure.
Advanced features like Docker and Traefik are already configured, allowing you to use real domains and HTTPS in your development environment. This makes it easy to work with webhooks, test CORS policies, and simulate production-like conditions in seconds, all without manual setup.
To help you compare:
-
Local development (on your computer):
- ✅ Full offline access: No internet connection required
- ❌ Resource limits: Dependent on your device's hardware
- ❌ Manual setup: You install and configure everything yourself
- ❌ Ongoing maintenance: Updates and backups are your responsibility
-
Remote development (on Code-Hero):
- ✅ Instant environment: Start developing right away, tools are pre-installed
- ✅ Scalable resources: Access to high-performance servers
- ✅ Work from anywhere: Any device, any location
- ✅ Production-like testing: Real HTTPS domains and ready-to-use integrations
- ❌ Requires internet: An active connection is needed
Your choice depends on your needs and preferences. If you want to start building immediately with minimal setup and enjoy the flexibility to switch devices, a remote solution is ideal. If you prefer working offline or have specific local requirements, a local environment may be a better fit.
Developing in Python: the remote approach
Choosing a remote environment for Python development eliminates the hassle of manual setup. You can launch new projects in seconds, with all the necessary tools ready to go.
With Code-Hero, your development workspace runs on high-performance servers, ensuring smooth and responsive performance even for demanding projects. This allows you to focus on writing code and building features, without wasting time configuring dependencies or environments.
Once your Code-Hero service is up and running, you can go straight to creating a Python project. There is no need to follow the local setup steps below.
Developing in Python: the local approach
Setting up Python locally means installing the runtime, dependencies, and development tools on your own machine. This gives you full control, but you are responsible for updates, backups, and keeping your environment consistent.
Setting up your local Python environment
For a flexible and consistent setup, you can use asdf, a tool for managing multiple runtime versions. asdf supports Python as well as many other languages like Node.js, Ruby, and PHP. It makes it easy to switch between versions and keep your projects isolated.
Traditional Python workflows rely on virtual environments (such as python venv, virtualenv, or mkvirtualenv) to separate dependencies. With asdf, you can manage both Python versions and project environments more robustly, reducing friction and avoiding common version conflicts.
Installing asdf
You can follow the official asdf installation guide to set up asdf on your system.
After installation, verify that asdf is properly configured by running:
asdf version
The installed version should be displayed, confirming that asdf is ready to use.
Installing Python using asdf
To add Python support and install the latest version, run:
asdf plugin add python https://github.com/danhper/asdf-python.git
asdf install python latest
asdf global python latest
Once finished, check your Python version:
python --version
This output confirms your Python installation is ready for development.
Creating a Python project
You can start a new Python project in just a few steps:
mkdir my_project
cd my_project
To set the Python version for this project and initialize a Git repository:
asdf install python latest \
&& asdf local python latest
echo "__pycache__/" >> .gitignore
git init
git add -A .
git commit -m "First commit"
These commands create a new directory, configure your Python version for the project, and start version control with an initial commit. You can begin development right away.
A local Git repository has been initialized for your Python project, but it is not yet connected to a remote hosting service.
For reliable backups and easier collaboration, you can create a repository on platforms like GitLab, GitHub, or Bitbucket.
If you are looking for a dedicated and secure Git hosting solution, Stackhero offers a GitLab cloud service running on private infrastructure in Europe or the USA. This option allows for fast setup and ensures confidentiality for your code.