NoBS Python

NoBS Python

Focus on Business Logic

NoBS is tailored for common Python processes, letting you focus on business needs rather than infrastructure. No need to manage Docker, Terraform, or complex CI/CD pipelines.

Dynamic Docker Management

NoBS manages Dockerfiles for you, dynamically adjusting based on your Python application's needs. No manual Dockerfile configuration required.

Infrastructure as Python

Replace Terraform and other infrastructure-as-code solutions. NoBS understands the required resources directly from your Python project configuration.

Simplified Secrets Management

Secure, type-safe secrets management built into the platform. Define and inject secrets directly through Python configuration without external tools.

Highlights

Develop Locally

Understand how NoBS helps you develop locally, setting up a quicker development cycle.

Get Started

This guide walks you through your first NoBS Python project, from installation to seeing your application running live. You'll build a simple FastAPI service and deploy it both locally and to the cloud, experiencing the full developer workflow in about 10 minutes.

What You'll Need

Your development machine should have Python 3.9 or later installed. You'll also need Docker running locally, which NoBS uses to containerize your application during development. If you don't have Docker yet, grab it from docker.com before continuing.

Access to NoBS Python is currently in public beta. If you haven't signed up yet, head to nobspython.com to create an account. Once you're registered, you'll be ready to deploy.

Installing the NoBS CLI

NoBS Python works through a command-line tool that handles everything from local development to production deployments. Install it into your project using uv (or pip if you prefer):

bash
uv add nobs

Confirm everything worked by checking the version:

bash
nobs --version

You should see output showing the installed NoBS version. Now you're ready to build your first project.

Creating Your First Project

Let's build a simple API that returns a friendly greeting. Start by creating a new directory for your project:

bash
mkdir my-first-api
cd my-first-api

Every NoBS project needs two things: your application code and a project definition that tells NoBS how to run it. Create a file called app.py with a basic FastAPI application:

python
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def hello():
    return {"message": "Hello from NoBS Python!"}

@app.get("/greet/{name}")
def greet(name: str):
    return {"message": f"Welcome, {name}!"}

This is just standard FastAPI code. Nothing special yet. Now create project.py to tell NoBS about your application:

python
from nobs.models import Project, FastAPIApp
from app import app

project = Project(
    name="my-first-api",
    server=FastAPIApp(app),
)

That's it. You've defined a complete NoBS project. The server=FastAPIApp(app) line tells NoBS to run your FastAPI application as a web server. NoBS will handle containers, networking, ports, and everything else.

Running Locally

Before deploying to the cloud, let's see your API running on your laptop. Make sure Docker is running, then execute:

bash
nobs up

NoBS springs into action. It builds a Docker image containing your application, starts up a local PostgreSQL database (in case you need it later), and launches your FastAPI server. Within a few seconds, you'll see output showing where your application is accessible:

INFO: Container my-first-api is accessible at http://localhost:8000

Open your browser to http://localhost:8000 and you'll see your greeting. Try http://localhost:8000/greet/Alice to see the personalized endpoint in action. Your application is running in the exact same containerized environment it will use in production, giving you confidence that what works locally will work everywhere.

While nobs up is running, any changes you make to app.py will automatically reload the server. Try modifying the greeting message and saving. The container restarts instantly with your changes. This hot-reload behavior makes local development fast and responsive, just like running uvicorn --reload directly, but with the added benefit of a production-like environment.

When you're done testing, stop the local environment with:

bash
nobs down

This shuts down the containers while preserving any data you might have created. Run nobs up again anytime to pick up where you left off.