Skip to main content

Shared SQLAlchemy models for the School Management System

Project description

skolo-shared

Shared SQLAlchemy models for a school management system. This package contains ORM models designed to be reusable and versioned for use in Python projects.

Installation

From PyPI (Recommended - Production)

Install the latest stable version from PyPI:

pip install skolo-shared

Or install a specific version:

pip install skolo-shared==0.0.35

For Development

For local development, clone the repository and install in editable mode:

git clone https://github.com/skolo-cloud/skolo-shared.git
cd skolo-shared
pip install -e .

Usage

Import models in your project:

from skolo_shared.models.tenant import Student, Staff
from skolo_shared.models.public import User
from skolo_shared.models.common.enums import PaymentStatusEnum

Features

  • 🏫 Tenant-based Architecture: Separate models for tenant-specific and public/shared data
  • 🕐 Time Zone Aware: All DateTime columns are timezone-aware with UTC as default
  • 🔒 Audit Trail: Built-in audit fields (created_by, updated_by) for tracking changes
  • 📦 Well-structured: Organized into logical modules (tenant, public, common)

Documentation

Time Zone Awareness

All DateTime columns in this package are time zone aware with UTC as the default. When working with datetime values:

  • Always use datetime.now(timezone.utc) instead of datetime.now()
  • Convert user input to UTC before storing
  • Convert UTC to local time only for display purposes

See Time Zone Guidelines for detailed documentation.

Version Management

This repository uses automated versioning:

  • Version numbers follow semantic versioning (MAJOR.MINOR.PATCH)
  • On every push to main, the version is automatically incremented
  • Git tags are automatically created for each version
  • Packages are automatically published to PyPI when tags are pushed

For Maintainers

Publishing to PyPI

The package is automatically published to PyPI when a version tag is pushed:

  1. The versioning workflow automatically creates tags on push to main
  2. The publish workflow is triggered by the tag and publishes to PyPI
  3. Ensure PYPI_API_TOKEN secret is configured in GitHub repository settings

For detailed setup instructions, see PyPI Publishing Guide.

Setting Up PyPI Token

  1. Create an account on PyPI
  2. Generate an API token from your PyPI account settings
  3. Add the token as a secret named PYPI_API_TOKEN in GitHub repository settings:
    • Go to repository Settings → Secrets and variables → Actions
    • Click "New repository secret"
    • Name: PYPI_API_TOKEN
    • Value: Your PyPI API token (starts with pypi-)

For complete instructions, see the PyPI Publishing Guide.

Manual Publishing (if needed)

If you need to publish manually:

# Install build tools
pip install build twine

# Build the package
python -m build

# Check the distribution
twine check dist/*

# Upload to PyPI
twine upload dist/*

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request to main
  5. The version will be automatically incremented on merge

Security Note

Never include credentials or tokens in installation commands. Always use:

# ✅ Correct - Secure
pip install skolo-shared==0.0.35

# ❌ Wrong - Insecure
pip install git+https://username:token@github.com/...

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skolo_shared-0.0.36.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skolo_shared-0.0.36-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file skolo_shared-0.0.36.tar.gz.

File metadata

  • Download URL: skolo_shared-0.0.36.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for skolo_shared-0.0.36.tar.gz
Algorithm Hash digest
SHA256 314ced8c6ddc0e358ec58a380b4bf9a94bb6dbd7e921baedcbbc00f8255cf699
MD5 938705576522eb38a4e81ac00cd4343c
BLAKE2b-256 c3a36971fe5947c8f9ad0e39c8cb2e40dd354761e4a60f3d9f7578197bb4008c

See more details on using hashes here.

File details

Details for the file skolo_shared-0.0.36-py3-none-any.whl.

File metadata

  • Download URL: skolo_shared-0.0.36-py3-none-any.whl
  • Upload date:
  • Size: 37.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for skolo_shared-0.0.36-py3-none-any.whl
Algorithm Hash digest
SHA256 1b01573f1ac4eea69b35836406278a085e9ccdcbd058237f6c0bb8f3e81e765f
MD5 667ef570144dabd08aa09fb361a9db72
BLAKE2b-256 18a181e42da157807db532ed9010dcbd5556d8e564665fc531272c0a9466b556

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page