Installation
Get NasirPy up and running in minutes! This guide covers different installation methods depending on your use case.
📋 Requirements
- Python 3.6+ (Python 3.8+ recommended)
- pip (Python package installer)
Python Version Support
NasirPy is designed to work with Python 3.6+ to ensure broad compatibility, but we recommend Python 3.8+ for the best experience with async features.
🚀 Quick Installation
Install from GitHub (Recommended)
The easiest way to install NasirPy is directly from GitHub:
This installs the latest stable version with all dependencies.
Install Specific Version
To install a specific release version:
Replace v0.1.0 with your desired version tag.
🛠️ Development Installation
If you want to contribute to NasirPy or modify the source code:
1. Clone the Repository
2. Install in Development Mode
The -e flag installs the package in "editable" mode, so changes to the source code are immediately reflected.
3. Install Development Dependencies (Optional)
For running tests and development tools:
🐍 Virtual Environment (Recommended)
It's always a good practice to use virtual environments:
📦 Dependencies
NasirPy has minimal dependencies to keep it lightweight:
- uvicorn - ASGI server for running applications
These are automatically installed when you install NasirPy.
✅ Verify Installation
Test that NasirPy is installed correctly:
# test_installation.py
from nasirpy import App, Response
app = App()
@app.get("/")
async def hello():
return Response({"message": "NasirPy is working!"})
if __name__ == "__main__":
print("✅ NasirPy installed successfully!")
print("🚀 Starting test server...")
import uvicorn
uvicorn.run(app, host="127.0.0.1", port=8000)
Run the test:
You should see:
✅ NasirPy installed successfully!
🚀 Starting test server...
INFO: Started server process [12345]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000
Visit http://127.0.0.1:8000 in your browser to see the response!
🔧 Troubleshooting
Common Issues
"Module not found" Error
Solution: Make sure you're in the correct virtual environment and the installation completed successfully:
Git Not Found
Solution: Install Git if it's not available:
- Windows: Download from git-scm.com
- macOS:
brew install gitor install Xcode Command Line Tools - Linux:
sudo apt-get install git(Ubuntu/Debian) or equivalent
Permission Errors
Solution: Use --user flag or virtual environment:
Getting Help
If you encounter issues:
- Check the GitHub Issues for known problems
- Create a new issue with your error message and system details
- Join the discussion in the repository discussions
🎯 Next Steps
Now that NasirPy is installed:
- Quick Start Guide - Build your first API in 5 minutes
- View Examples - See real applications
- Explore the Code - Understand how it works
Ready to Go!
You're all set! NasirPy is installed and ready for you to start learning web framework internals.