Skip to main content

Angel727

Angel727 — Describe It. Build It.

Angel727

Angel727 — Describe It. Build It.

Angel727 is created by T.P. Thangaprabhu, B.Sc., MBA., CIMA Adv Dip MA (UK), FCMA., ACPIFSD (IIT - Roorkee), a Cost Accountant, Full Stack Developer & Data Scientist.

Angel727 is an interactive, keyboard-driven Django development assistant that helps developers create and extend Django and Django REST Framework applications without manually writing repetitive boilerplate code.

Instead of remembering Django field syntax, serializer configuration, ViewSets, admin registration, URL routing, and other repetitive patterns, you describe what you want and Angel727 guides you through a structured interactive process.

The vision behind Angel727 is simple:

Let developers focus on what the application should do, while Angel727 handles the repetitive implementation work.

USER REQUIREMENT
       ↓
INTERACTIVE WIZARD
       ↓
STRUCTURED SPECIFICATION
       ↓
VALIDATION ENGINE
       ↓
CODE GENERATORS
       ↓
SAFE SOURCE PATCHING
       ↓
PREVIEW / DIFF
       ↓
USER CONFIRMATION
       ↓
PROJECT UPDATE

Why Angel727?

Django makes application development powerful and productive, but a significant amount of repetitive work is still required.

For one model, developers may need to create and maintain:

models.py
admin.py
serializers.py
views.py
urls.py
forms.py
permissions.py
filters.py
validators.py
tests.py

Angel727 aims to reduce this repetitive work.

For example, instead of manually writing:

class Customer(models.Model):
    name = models.CharField(max_length=100)
    email = models.EmailField(unique=True)

you can define the model interactively and let Angel727 generate the appropriate Django code.

The goal is simple: let the developer describe the application requirement while Angel727 handles repetitive Django implementation.

Features

Current Angel727 functionality includes:

  • Interactive Django project detection
  • Keyboard-driven model wizard
  • Arrow-key field selection
  • Django field type selection
  • Field-specific configuration
  • Django-aware validation
  • Structured model specifications
  • Django model generation
  • Django admin generation
  • Django REST Framework serializer generation
  • DRF ViewSet generation
  • URL generation
  • Existing source-code inspection
  • Safe source patching
  • Diff preview
  • Confirmation before changes
  • File backups
  • Undo support (reverts a whole operation at once, including files it created)
  • Saved specifications
  • Project inspection
  • Automated tests

Installation

Install Angel727 from PyPI:

pip install angel727

After installation, verify:

angel727 version

You can also run:

python -m angel727 version

Requirements

Angel727 is designed to be lightweight. The package itself does not require Django or Django REST Framework for its core functionality.

For Django project generation, you need an existing Django project. For DRF-specific generation, Django REST Framework must be available in the target project.

Typical environment:

Python 3.9+
Django
Django REST Framework (optional)

Quick Start

Navigate to an existing Django project. The project should contain manage.py:

myproject/
├── manage.py
├── myproject/
│   ├── settings.py
│   ├── urls.py
│   ├── asgi.py
│   └── wsgi.py
└── customers/
    ├── models.py
    ├── admin.py
    └── ...

Run:

angel727 model Customer

Angel727 starts the interactive model builder.

Interactive Model Builder

Suppose you want to create Customer with fields name, email, address, pin.

Run:

angel727 model Customer

Angel727 asks for each field individually:

Field name: name

Then:

What type is "name"?

❯ CharField
  TextField
  EmailField
  IntegerField
  DecimalField
  BooleanField
  DateField
  DateTimeField
  UUIDField
  ForeignKey
  OneToOneField
  ManyToManyField
  FileField
  ImageField
  JSONField

↑ ↓ Navigate    Enter Select

Use / to move, Enter to select, Esc to go back. There is no need to remember numeric menu choices.

Field Configuration

After selecting a field type, Angel727 asks only the questions relevant to that field.

For a CharField:

Maximum length?
Required?
Allow NULL?
Allow blank?
Unique?
Database index?

Other applicable options may include default value, help text, verbose name, and database column name. Angel727 does not ask irrelevant questions for field types where those options do not apply.

Intelligent Field Recommendations

Angel727 can provide recommendations based on the meaning of a field name.

For example, pin may look numeric, but a PIN is normally an identifier rather than a mathematical number, and may contain leading zeros (012345). Angel727 recommends CharField with optional numeric validation instead of automatically choosing IntegerField.

Similarly, fields such as phone, mobile, postal_code, zip_code, amount, and percentage get type recommendations based on their name. The user always remains in control and can choose a different field type.

Supported Django Field Types

Angel727 supports the core Django field types used by the model builder, including:

AutoField            BigAutoField          BigIntegerField
BinaryField          BooleanField          CharField
TextField            EmailField            IntegerField
PositiveIntegerField PositiveSmallIntegerField SmallIntegerField
PositiveBigIntegerField FloatField         DecimalField
DateField            DateTimeField         TimeField
DurationField        UUIDField             SlugField
URLField             GenericIPAddressField FileField
ImageField           JSONField             ForeignKey
OneToOneField        ManyToManyField

The field system is designed to be extensible.

ForeignKey Support

For a ForeignKey, Angel727 asks for the related model, then:

on_delete:

❯ CASCADE
  PROTECT
  SET_NULL
  SET_DEFAULT
  RESTRICT
  DO_NOTHING

Additional relationship settings can include related_name, related_query_name, null, blank, default, and db_index.

Angel727 validates relationships before generating code. For example, choosing on_delete = SET_NULL automatically enforces null=True on that field.

Structured Specification

Angel727 does not directly convert user input into arbitrary Python code. Instead, it first creates a structured specification:

{
  "model": "Customer",
  "fields": [
    {
      "name": "name",
      "type": "CharField",
      "options": {
        "max_length": 100,
        "blank": false,
        "null": false,
        "unique": false,
        "db_index": false
      }
    },
    {
      "name": "email",
      "type": "EmailField",
      "options": { "unique": true, "blank": false, "null": false }
    }
  ]
}

This structured specification becomes the source of truth. The generators then use it to produce the appropriate Django code.

Code Generation

From a model specification, Angel727 generates coordinated Django components.

models.py

class Customer(models.Model):
    name = models.CharField(max_length=100)
    email = models.EmailField(unique=True)
    address = models.CharField(max_length=500)
    pin = models.CharField(max_length=6)

admin.py

@admin.register(Customer)
class CustomerAdmin(admin.ModelAdmin):
    list_display = ("name", "email", "address", "pin")
    search_fields = ("name", "email")

serializers.py (when Django REST Framework is detected)

class CustomerSerializer(serializers.ModelSerializer):
    class Meta:
        model = Customer
        fields = "__all__"

views.py

class CustomerViewSet(viewsets.ModelViewSet):
    queryset = Customer.objects.all()
    serializer_class = CustomerSerializer

urls.py (DRF router)

router.register("customers", CustomerViewSet, basename="customer")

Existing routes are preserved. Duplicate registrations are not created.

Existing Project Safety

Angel727 is designed to work with existing Django projects. It does not blindly replace entire source files.

Before modifying a file, Angel727:

  1. Inspects the existing file
  2. Detects existing code
  3. Validates the requested change
  4. Prepares a minimal modification
  5. Displays the proposed diff
  6. Creates a backup
  7. Asks for confirmation
  8. Applies the change

For example, if admin.py already contains a UserAdmin registration and you create Customer, Angel727 adds the Customer registration without disturbing the existing User registration.

Preview and Diff

Before writing files, Angel727 shows what will change:

Files to modify:

  models.py        +7
  admin.py         +8
  serializers.py   +8
  views.py         +8
  urls.py          +7

followed by a unified diff of each changed file, so you can review before anything is applied.

Confirmation Before Writing

Angel727 does not silently modify the project:

Proceed?

❯ Generate
  Edit
  Cancel

Only after confirmation are changes written.

Backups

Before modifying project files, Angel727 creates backups under:

.angel727/
└── backups/

This provides a recovery mechanism for changes made by Angel727.

Undo

To revert the most recent Angel727 operation:

angel727 undo

A single angel727 undo restores every file touched by the previous operation as one unit — files that were modified are restored to their prior content, and files that Angel727 newly created are removed.

Specifications

Angel727 stores structured specifications under:

.angel727/
└── specifications/
    ├── customer.json
    ├── product.json
    └── invoice.json

This allows generated models to be reviewed, saved, edited, validated, and regenerated later.

Project Inspection

Run:

angel727 inspect

Angel727 inspects the Django project and reports:

+======================================+
|              ANGEL727                |
|  Django Application Builder          |
+======================================+

Project: myproject
Django: detected
DRF: detected

plus any saved specifications found under .angel727/specifications/.

Command Line Commands

Start Angel727

angel727

Running Angel727 without arguments opens the interactive main menu.

Command Description
angel727 init Scaffold .angel727/ in the current Django project
angel727 inspect Show detected project facts
angel727 model Customer Create/extend a model and generate coordinated files
angel727 preview Customer Preview changes for a saved specification, without writing anything
angel727 diff Customer Alias for preview
angel727 generate Customer Regenerate files from a saved specification
angel727 validate Customer Re-check a saved specification for consistency
angel727 undo Revert the previous Angel727 operation
angel727 version Show the installed version

Every command above has been run against a real (synthetic) Django project as part of this release's test pass — see Current Status.

Project Architecture

Angel727 follows a layered architecture:

                   Angel727
                       │
                       ↓
               Interactive Wizard
                       │
                       ↓
              Structured Schema
                       │
                       ↓
              Validation Engine
                       │
                       ↓
                Code Generators
                       │
                       ↓
               Source Analysis
                       │
                       ↓
                Safe Patching
                       │
                       ↓
                Diff / Preview
                       │
                       ↓
                 User Approval
                       │
                       ↓
               Django Project

The wizard never writes Python code directly — everything passes through the structured specification first.

Package Architecture

angel727/
└── src/
    └── angel727/
        ├── cli.py
        ├── version.py
        ├── django/
        │   ├── field_types.py
        │   └── rules.py
        ├── files/
        │   ├── backup.py
        │   ├── manager.py
        │   └── undo.py
        ├── generators/
        │   ├── base.py
        │   ├── models.py
        │   ├── admin.py
        │   ├── serializers.py
        │   ├── views.py
        │   └── urls.py
        ├── project/
        │   └── detector.py
        ├── schema/
        │   ├── field.py
        │   ├── model.py
        │   └── specification.py
        ├── source/
        │   ├── diff.py
        │   └── patcher.py
        ├── specifications/
        ├── utils/
        └── wizard/
            ├── field_wizard.py
            ├── menu.py
            └── model_wizard.py

Generator Architecture

schema
   │
   ├──────────────┐
   ↓              ↓
Model          Field
Specification  Specification
   │
   ↓
Generators
   │
   ├── models.py
   ├── admin.py
   ├── serializers.py
   ├── views.py
   └── urls.py

The generator layer is deliberately separated from the interactive wizard, so new generators can be added without redesigning the model builder.

Source Patching

The source layer is responsible for import handling, existing-class detection, safe modifications, and diff generation, using LibCST rather than naive string concatenation — the goal is targeted changes, not full-file replacement.

Design Principle

Angel727 is not simply:

AI → Python

Instead:

Requirement
     ↓
Structured Specification
     ↓
Django-aware Validation
     ↓
Code Generator
     ↓
Source Analysis
     ↓
Safe Patch
     ↓
Preview
     ↓
Confirmation
     ↓
Project Update

This makes the generated code predictable, inspectable, and maintainable.

Current Status — Version 0.1.0

Angel727 0.1.0 establishes the core architecture and initial Django development workflow.

Verified working in this release (manually exercised against a synthetic Django project, in addition to the automated test suite):

angel727 version
angel727 inspect
angel727 model Customer
angel727 preview Customer
angel727 validate Customer
angel727 undo

Also implemented: project detection, arrow-key navigation, field-specific configuration, structured specifications, Django-aware validation, admin/serializer/ViewSet/URL generation, source patching, diff/preview, and file backups.

The automated test suite contains 29 tests, and it currently passes:

29 passed

Roadmap

Angel727 is intended to grow into a complete Django application development assistant.

Django Components: forms.py, permissions.py, filters.py, validators.py, services.py, managers.py, signals.py, tests.py

Project Configuration: settings.py, project urls.py, database configuration, authentication, email, static/media files, caching, Celery, Redis

Developer Features: deeper source analysis, more advanced diffing, refactoring support, automatic test generation, migration assistance

Natural Language (future): requirements described in plain English, converted into a structured specification before any code is generated — the specification layer stays authoritative

Optional AI (future): requirement interpretation, field recommendations, business-rule suggestions, code explanations, documentation, test generation, refactoring — always optional, never bypassing the deterministic validation layer

Development

python -m pip install -e .
python -m pytest

Expected result:

29 passed

Building the Package

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*

This creates:

dist/
├── angel727-0.1.0-py3-none-any.whl
└── angel727-0.1.0.tar.gz

Release

pip install angel727

Contributing

Contributions, suggestions, bug reports, and feature requests are welcome. When contributing:

  • Keep the architecture modular
  • Do not bypass the structured specification layer
  • Do not introduce unsafe source modifications
  • Preserve existing project code
  • Add tests for new functionality
  • Run the complete test suite before submitting changes

Security

Angel727 modifies source code and project files. Review generated changes before applying them, particularly in production projects.

Do not store passwords, API keys, database credentials, private tokens, or other secrets inside generated source code — use environment variables and appropriate Django configuration for sensitive values.

License

Angel727 is released under the MIT License. See LICENSE for details.

Project Vision

WHAT DO YOU WANT TO BUILD?
            ↓
       ANSWER QUESTIONS
            ↓
     DEFINE THE STRUCTURE
            ↓
      ANGEL727 GENERATES
            ↓
      REVIEW THE CHANGES
            ↓
        BUILD YOUR APP

Angel727 — Describe It. Build It.

Download files

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

Source Distribution

angel727-0.1.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

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

angel727-0.1.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file angel727-0.1.0.tar.gz.

File metadata

  • Download URL: angel727-0.1.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.2

File hashes

Hashes for angel727-0.1.0.tar.gz
Algorithm Hash digest
SHA256 af94b54ef5149741af72f1ac9823623e2546587fc4632d2133ac71a2e80dff72
MD5 7132d0f8d191593d8759c88ca6dfa67d
BLAKE2b-256 3be554c14675e1652fd38ce879d49a5dd05f8ab4a5496be2c0e49d0c2a537282

See more details on using hashes here.

File details

Details for the file angel727-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: angel727-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.2

File hashes

Hashes for angel727-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31e7e3c4473e459b56d51a8eeaf60b09edacea538ba59a55ebe07123124c9617
MD5 33db65a23d9ae12501e1d106df33d51f
BLAKE2b-256 4d36a172c920d948404f95bc7eaa9cdb2c846005f73d16be0230c5006febc14f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page