Metadata-Version: 2.3
Name: smoothglue_django_core
Version: 1.3.0
Summary: Enhance your development with SmoothGlue™, providing a user-friendly gateway to interoperable microservices for effortlessly creating complex app behaviors.
License: Proprietary
Keywords: Interoperability,API Integration,Edge Computing,Application Framework,Data-Driven Development
Author: BrainGu
Author-email: smoothglue@braingu.com
Maintainer: BrainGu
Maintainer-email: info@braingu.com
Requires-Python: >=3.12,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Dist: Django (>=4.2.0,<6.0.0)
Requires-Dist: PyJWT (>=2.10.1,<3.0.0)
Requires-Dist: adrf (>=0.1.9,<1.0.0)
Requires-Dist: coverage[toml] (==7.9.2)
Requires-Dist: django-cors-headers (>=4.6.0,<5.0.0)
Requires-Dist: django-filter (>=25.1,<26.0)
Requires-Dist: django-json-widget (>=2.0.1,<3.0.0)
Requires-Dist: djangorestframework (>=3.15.2,<4.0.0)
Requires-Dist: drf-spectacular (>=0.28.0,<1.0.0)
Requires-Dist: pillow (>=11.1.0,<12.0.0)
Requires-Dist: pytest (>=8.4.0)
Project-URL: Homepage, https://braingu.com/solutions/smoothglue/
Project-URL: Issues, https://braingu.com/support
Description-Content-Type: text/markdown

# SmoothGlue Django Core

# Overview

SmoothGlue Django Core provides a robust foundation for creating extendable and secure application features, optimized for highly regulated environments. This project includes reusable Django apps designed to streamline development for applications requiring stringent security and compliance measures.

## Key Features

- **Abstract Models:** Includes abstract models like `AuditModel` and `TimeAuditModel` for audit trail functionality in your models.
- **Reusable Serializers:** A set of base serializers for consistent API development.
- **Custom User Model:** Extensible user model adaptable to various authentication requirements.
- **Environment-specific Configuration:** Designed for easy configuration in different environments (development, staging, production).

## Installation

### Prerequisites

* Python 3.12+
* Django 4.2+
* Django REST Framework 3.15.2+


### Install SmoothGlue Django Core From PyPI (Official Use)

1. Use pip and the following command inside the Django project:

   ```python
   pip install smoothglue_django_core
   ```

2. Enable Smoothglue Django Core's apps in your settings.py:



```bash
INSTALLED_APPS = [
    # ... other installed apps ...
    'smoothglue.core',
    'smoothglue.authentication',
    'smoothglue.tracker',
    # ... other installed apps ...
]
```

3. **Database Migrations:**

Run the migrations to create the necessary database tables:

```bash
python manage.py migrate
```

4. Run the development server to confirm the project continues to work.

## API Usage

This package exposes several API endpoints to manage users, organizations, and other related data.

### Authentication
This package uses JWT-based authentication. The JWT is decoded from the Authorization or Jwt header of the request. In a development environment, ENABLE_SINGLE_USER_MODE can be set to `True` to bypass JWT authentication and use a default "UnknownUser".

### Endpoints

#### Users
- `GET /users/`: Retrieves a list of all users.

- `POST /users/`: Creates a new user.

- `GET /users/{id}/`: Retrieves a specific user by their ID.

- `PUT /users/{id}/`: Updates a specific user.

- `PATCH /users/{id}/`: Partially updates a user.

- `DELETE /users/{id}/`: Deletes a user.

#### Organizations

- `GET /organizations/`: Retrieves a list of all organizations.

- `POST /organizations/`: Creates a new organization.

- `GET /organizations/{id}/`: Retrieves a specific organization by its ID.

- `PUT /organizations/{id}/`: Updates an organization.

- `PATCH /organizations/{id}/`: Partially updates an organization.

- `DELETE /organizations/{id}/`: Deletes an organization.

#### Organization Members

- `GET /org-members/`: Retrieves a list of all organization members.

#### Organization Categories

- `GET /org-categories/`: Retrieves a list of all organization categories.

- `POST /org-categories/`: Creates a new organization category.

- `GET /org-categories/{id}/`: Retrieves a specific organization category by its ID.

- `PUT /org-categories/{id}/`: Updates an organization category.

- `PATCH /org-categories/{id}/`: Partially updates an organization category.

- `DELETE /org-categories/{id}/`: Deletes an organization category.

#### Active User

- `GET /active_user/`: Retrieves the currently authenticated user's information.

## License

This project is licensed under a Proprietary License. See the [LICENSE](./LICENSE) file for more details.

