Technologia

Python

Najpopularniejszy język na świecie. Backend, AI/ML, data science, automatyzacja — Python robi wszystko.

Czym jest Python?

Python to interpretowany, dynamicznie typowany język programowania znany z czytelnej składni i ogromnego ekosystemu bibliotek. Jest numerem 1 w rankingach popularności (TIOBE, Stack Overflow) i standardem w AI/ML, data science i backend development.

W Assadante używamy Pythona do budowy API (Django, FastAPI), integracji AI (OpenAI, LangChain), przetwarzania danych i automatyzacji procesów biznesowych.

Przykłady kodu

Podstawy i typowanie

Python from dataclasses import dataclass from datetime import datetime @dataclass class User: name: str email: str age: int created_at: datetime = datetime.now() @property def is_adult(self) -> bool: return self.age >= 18 def display(self) -> str: return f"{self.name} ({self.age})"

FastAPI — REST API

FastAPI from fastapi import FastAPI, HTTPException from pydantic import BaseModel, EmailStr app = FastAPI() class CreateUser(BaseModel): name: str email: EmailStr age: int @app.post("/users", status_code=201) async def create_user(data: CreateUser): # Pydantic automatycznie waliduje dane user = await db.create_user(**data.dict()) return {"id": user.id, "name": user.name} @app.get("/users/{user_id}") async def get_user(user_id: int): user = await db.get_user(user_id) if not user: raise HTTPException(404, "User not found") return user

AI / OpenAI integracja

Python + OpenAI from openai import AsyncOpenAI client = AsyncOpenAI() async def summarize(text: str) -> str: response = await client.chat.completions.create( model="gpt-4o", messages=[ {"role": "system", "content": "Podsumuj tekst w 3 zdaniach."}, {"role": "user", "content": text}, ], temperature=0.3, ) return response.choices[0].message.content

List comprehension & pattern matching

Python 3.12 # List comprehension active_users = [u for u in users if u.is_active and u.age > 18] # Pattern matching (Python 3.10+) match command: case {"action": "create", "data": data}: return create_item(data) case {"action": "delete", "id": id}: return delete_item(id) case _: raise ValueError("Unknown command")

Ocena kompetencji

Ekosystem
99%
AI / ML
99%
Łatwość nauki
95%
Popularność
99%
Wydajność
55%
Web backend
88%

Co potrafi Python

Backend API

Django, FastAPI, Flask. REST, GraphQL, WebSockets. ORM (SQLAlchemy, Django ORM).

AI / Machine Learning

PyTorch, TensorFlow, scikit-learn, Hugging Face. Trenowanie modeli, inference, fine-tuning.

Data Science

Pandas, NumPy, Matplotlib. Analiza danych, wizualizacje, raporty, ETL pipelines.

Automatyzacja

Scripting, web scraping (BeautifulSoup, Scrapy), task scheduling (Celery, APScheduler).

LLM & AI Apps

LangChain, OpenAI API, RAG, embeddings, chatboty, asystenci AI.

DevOps & CLI

Ansible, Fabric, Click. Narzędzia CLI, deployment scripts, infrastructure automation.

Kiedy wybrać Python?

Idealny gdy: budujesz backend API, integrujesz AI/ML, potrzebujesz szybkiego prototypu, przetwarzasz dane, budujesz chatboty i asystentów AI.

Nie najlepszy gdy: budujesz frontend (lepiej TypeScript), potrzebujesz ekstremalnej wydajności (lepiej Go/Rust), budujesz aplikację mobilną (lepiej Flutter).