Installation
This guide will help you install and set up the lback framework on your local machine.
Requirements
Python 3.8+
pip (Python package installer)
virtualenv (optional but highly recommended for managing project dependencies in an isolated environment)
Installation Steps
To ensure a smooth installation and proper functioning of Lback Framework, especially for file handling features, please follow these steps:
Create and Activate a Virtual Environment (Recommended)
It’s highly recommended to create a dedicated virtual environment for your project. This isolates your project’s dependencies and prevents conflicts with other Python projects on your system.
# Create a virtual environment named 'venv' in your project directory python3 -m venv venv # Activate the virtual environment # On macOS and Linux: source venv/bin/activate # On Windows: .\venv\Scripts\activate
Once activated, your terminal prompt will typically show (venv) indicating you are in the virtual environment.
Install System-level Dependencies (for File Type Detection)
Lback Framework utilizes python-magic for robust file type detection.
This Python library relies on a native system library called libmagic.
You need to install libmagic using your system’s package manager before installing Lback’s Python packages.
For macOS and Linux users:
On Debian/Ubuntu-based systems:
sudo apt-get update sudo apt-get install libmagic
On Fedora/RHEL/CentOS-based systems:
sudo dnf install file-libs # or sudo yum install file-libs
On macOS (using Homebrew):
brew install libmagic
For Windows users:
No manual steps are typically required for libmagic.
Lback’s installation process will automatically handle this dependency for you using python-magic-bin.
Install lback from PyPI
Once your virtual environment is activated (if you chose to use one), you can install lback using pip:
pip install lback-framework
create a project:
lback startproject myproject
Replace
myprojectwith your desired project name.Run initial setup:
python manage.py makemigrations python manage.py migrate python manage.py create_superuser python manage.py runserver
You should now be able to access the application in your browser at http://127.0.0.1:8000.