Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR

Python Programlama
and Pip Package Manager

Step into the world of software development with Python's powerful features and the Pip package manager. Realize your projects with simple syntax, rich libraries and easy package management.

Easy
Syntax

Clear and simple language structure

Package
Management

Thousands of ready modules with pip

Virtual
Ortamlar

Isolated development environments

multiple
paradigm

Different programming approaches

What is Python?

An easy-to-learn and versatile programming language

Python is a high-level, interpreted programming language developed by Guido van Rossum in 1991 .

Python has a design that emphasizes readability and clean syntax. This feature provides ease of learning for beginners and simplifies code maintenance for experienced developers. Founded on the philosophy that "there should only be one way to do something," Python encourages code to be understandable and consistent.

Information: Python's name comes from "Monty Python", a comedy group loved by Guido van Rossum. You can find references to Monty Python skits in the Python documentation.

Basic Features of Python

  • Simple and Clear Syntax: A clean and simple structure that prioritizes code readability.
  • Interpretive Language: It can be run without requiring compilation and offers rapid development.
  • Dynamic Type System: There is no need to specify the type when defining a variable, Python determines it automatically.
  • Automatic Memory Management: Memory management is automatic thanks to the garbage collector.
  • Extensive Standard Library: With its "batteries included" philosophy, it offers ready-made modules that meet many needs.
  • Multi-Platform Support: It can run on Windows, macOS, Linux and other platforms.

Python Versions

There are two main widely used versions of Python: Python 2 and Python 3. Official support for Python 2 ended in 2020 , and it is recommended to use Python 3 for new projects.

Python 2 vs Python 3 Example
# Python 2
print "Merhaba, Dünya!"

# Python 3
print("Merhaba, Dünya!")

Uses of Python

Data Science and Analysis

Data processing, analysis and visualization with libraries such as NumPy, Pandas, Matplotlib and SciPy.

Artificial Intelligence and Machine Learning

Developing AI and ML applications with libraries such as TensorFlow, PyTorch, scikit-learn.

Web Development

Creating web applications and APIs with frameworks such as Django, Flask, FastAPI.

Automation and Scripting

System administration, test automation and automating repetitive tasks.

First Python Program

It is very easy to start programming with Python. Here's a simple "Hello World" example:

First Python Program
# İlk Python programımız
print("Merhaba, Python Dünyası!")

# Değişken kullanımı
ad = "Ahmet"
yas = 30
print(f"{ad} {yas} yaşındadır.")

# Basit bir fonksiyon
def selamla(isim):
    return f"Merhaba, {isim}!"

# Fonksiyonu çağırma
mesaj = selamla("Ayşe")
print(mesaj)

Pip Package Manager

Key to access thousands of packages in the Python ecosystem

What is Pip?

Pip (Pip Installs Packages) is the standard package management system for Python. It is the primary tool used to manage the package ecosystem of the Python programming language.

Key Features of Pip:
  • Access to more than 300.000 packages on the Python Package Index (PyPI)
  • Easy package installation, update and removal
  • Dependency management and conflict resolution
  • Possibility to specify specific versions or version ranges
  • Export and import requirements
Information: In Python 3.4 and later versions, pip is automatically installed. On older versions you may need to install it manually.
Checking Pip Version:
Pip Version Check Command
pip --version
# veya
pip -V

Basic Pip Commands

Pip works via the command line interface and provides package management with various subcommands. Here are the most common pip commands:

Package Installation
# Temel paket kurulumu
pip install paket_adi

# Belirli bir version kurma
pip install paket_adi==1.0.0

# En son version kurma
pip install --upgrade paket_adi
# veya
pip install -U paket_adi

# Sürüm aralığı belirtme
pip install "paket_adi>=1.0.0,<2.0.0"
Listing and Searching Packages
# Kurulu paketleri listeleme
pip list

# Detailed liste
pip list -v

# Güncellenebilir paketleri bulma
pip list --outdated

# Paket arama
pip search paket_adi  # Not: Bu komut artık kullanımdan kaldırılmıştır.
Package Removal
# Paket kaldırma
pip uninstall paket_adi

# Etkileşimli kaldırma (onay sorarak)
pip uninstall -y paket_adi
Display Package Information
# Paket hakkında bilgi
pip show paket_adi

# Detailed bilgi
pip show -v paket_adi

Package Requirements Management

You can use pip and a requirements.txt file to manage your project's dependencies and allow for reproducibility across different machines.

Create a Requirement File:
Creating requirements.txt
# Tüm kurulu paketleri dışa aktarma
pip freeze > requirements.txt

# Çıktı örneği (requirements.txt içeriği):
# numpy==1.21.0
# pandas==1.3.0
# matplotlib==3.4.2
# scikit-learn==0.24.2
Installing Packages from Requirements:
Installation from requirements.txt file.
# requirements.txt'deki all paketleri kurma
pip install -r requirements.txt
Manual creation of requirements.txt:
Manual requirements.txt Example
# Web uygulama gereksinimleri
Flask>=2.0.0,<3.0.0
SQLAlchemy==1.4.23
python-dotenv==0.19.0

# Veri işleme
pandas>=1.3.0
numpy>=1.20.0

# Test araçları
pytest==6.2.5

Virtual Environments

Virtual environments, special Python environments used to isolate the dependencies of different Python projects from each other. They allow each project to manage its own dependencies and versions without affecting the main system.

Important: If you are working on different projects, using a separate virtual environment for each project is the best practice to prevent package conflicts.
Creating a Virtual Environment with venv (Python 3.3+):
Using venv
# Virtual ortam createma
python -m venv proje_ortami

# Windows'ta sanal ortamı aktifleştirme
proje_ortami\Scripts\activate

# Unix/macOS'ta sanal ortamı aktifleştirme
source proje_ortami/bin/activate

# Virtual ortamı devre dışı bırakma
deactivate
Manage Virtual Environment Packages:
Using Pip in Virtual Environments
# Virtual ortamı aktifleştirdikten sonra:

# Paket kurulumu
pip install numpy pandas matplotlib

# Gereksinimleri dışa aktarma
pip freeze > requirements.txt

# Başka bir ortamda same paketleri kurma
pip install -r requirements.txt

Sample Usage Scenarios

Examples of using pip in real projects

Veri Analizi Projectctsi

Using Pip in a Data Analysis Projectct
# 1. Virtual ortam createma
python -m venv veri_analizi_ortami
source veri_analizi_ortami/bin/activate  # Unix/macOS
# veya
veri_analizi_ortami\Scripts\activate  # Windows

# 2. Gerekli paketleri kurma
pip install numpy pandas matplotlib seaborn scikit-learn jupyter

# 3. Jupyter Notebook başlatma
jupyter notebook

# 4. Projectctyi bitirince gereksinimleri kaydetme
pip freeze > requirements.txt

# 5. Virtual ortamdan çıkma
deactivate

Description: In this scenario, we are creating an isolated environment that includes the basic packages required for data analysis. Interactive data analysis can be performed using Jupyter Notebook, and all dependencies are recorded in the file.

Web Application Development

Using Pip for Flask Web Application
# 1. Virtual ortam createma
python -m venv web_app_env
source web_app_env/bin/activate  # Unix/macOS

# 2. Flask ve bağımlılıklarını kurma
pip install flask flask-sqlalchemy flask-login python-dotenv

# 3. Development sırasında yeni bağımlılıklar ekleme
pip install flask-wtf flask-migrate

# 4. Projectctyi canlıya almak for gereksinimleri kaydetme
pip freeze > requirements.txt
Example of requirements.txt
click==8.0.1
Flask==2.0.1
Flask-Login==0.5.0
Flask-Migrate==3.1.0
Flask-SQLAlchemy==2.5.1
Flask-WTF==0.15.1
itsdangerous==2.0.1
Jinja2==3.0.1
MarkupSafe==2.0.1
python-dotenv==0.19.0
SQLAlchemy==1.4.23
Werkzeug==2.0.1
WTForms==2.3.3

Description: In this scenario, we are developing a web application using the Flask web framework and its related extensions. As we add new packages during the development process, we record all dependencies along with their versions.

Automated Test Environment

Using Pip for Test Automation
# 1. Test for sanal ortam createma
python -m venv test_env
test_env\Scripts\activate  # Windows

# 2. Test araçlarını kurma
pip install pytest pytest-cov pytest-mock requests-mock

# 3. Test kapsamına special paketleri kurma
pip install -e .  # Mevcut paketi development modunda kurma

# 4. Test çalıştırma
pytest --cov=proje_adi tests/

# 5. CI/CD sistemi for gereksinimleri kaydetme
pip freeze > test-requirements.txt

Description: In this scenario, we set up a Python project's test environment. Pytest and its plugins enable comprehensive tests, editable package installation with `-e .`, and coverage reporting.

Top