Skip to main content

Simple file-based authentication system with messaging, permissions, and moderation.

Documentation • Report Bug • Request Feature


🌟 Why This Project?

  • Fully customizable and easy to extend
  • Includes real-world features (messaging, permissions, banning, etc.)
  • Optimized and Lightweight — no database required

✨ Features

  • 🔑 User authentication (login & signup)
  • 🔒 Password hashing using SHA-256
  • 📬 User-to-user messaging
  • 📥 Mailbox system (read, send, clear)
  • 🛡️ Permission system (tiers 1–5)
  • ⬆️ User promotion system
  • 🚫 User banning system
  • ❌ Account deletion
  • 🛠️ Initial setup mode

🔐 System Overview

This system uses plain text files as a simple, lightweight database.

📁 Data Storage

  • users.txt → Stores usernames and hashed passwords
  • bannedusers.txt → Stores banned usernames
  • user_(id).txt → Stores user permissions
  • mailbox_(username).txt → Stores user messages

🛠️ First-Time Setup

download the program by running:

pip install simple-login-system==0.1.3

Run it by typing

python -m simplelogin.login

Run the program and type:

setup

!DISCLAIMER!

Setup user can only be used for promoting and some default features

Make a different user and promote it to use more features

This will:

  • Create a default admin account
  • Grant admin promotion permissions

Default credentials:

  • Username: setup
  • Password: setup

⚠️ Important: Delete this account after creating your own admin account and give it perms.


🧑‍💻 Usage

At startup, choose:

  • log in
  • sign up
  • setup

📜 Commands

Command Description
help Show all commands
date/time Shows the current date and time
message Send a message to a user
readmail Read your mailbox
promote Promote a user (requires permission)
ban Ban a user
blacklist Blacklists a username from use for a new account
deleteaccount Delete your account
changelog View changes
quit Exit the program

🚫 Banning System

  • Stored in bannedusers.txt

When a user is banned:

  • Their account is removed
  • Their mailbox is deleted
  • Their username cannot be reused

🔮 Planned Features

  • Improved security (salted hashing, validation)
  • Better error handling
  • Cleaner code structure
  • Database support (SQLite)
  • Logging system
  • Admin tools / interface

🤝 Contributing

  • Found a bug? Open an issue
  • Have an idea? Suggest a feature
  • Want to improve the code? Submit a PR

All contributions are welcome.


🤖 AI declaration

Used copilot for deployment to PyPi and chatgpt for simple bug fixes early on and for writing part of the ReadMe


📄 License

This project is free to use for educational purposes.


Optimization

  • I made the program as optimized as possible by using defs to make it run smooth, I also dont use any databases or external programs that might make it take more memory or cpu capability.
  • I made it run fast and smooth with not too much random bulk that would be in the way of users access to the program

Made with learning in mind.
If you like it, consider ⭐ starring the repo!

I will try to update this program once in a while so I have a changelog aswel.

Metadata

Release files for simple-login-system 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-login-system 0.1.7
File Size Uploaded
simple_login_system-0.1.7.tar.gz 47.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simple-login-system 0.1.7
File Interpreter ABI Platform
simple_login_system-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 83.1 kB

Release files / simple_login_system-0.1.7.tar.gz

Download URL simple_login_system-0.1.7.tar.gz
Size 47.0 kB
Tags Source
SHA-256 checksum
How to use checksums
af5ab3c021d488bec604b1ac43508a2f130c8662135a9a188b88cae6df75d9c6
BLAKE2b-256 checksum
How to use checksums
c8572f1b4f82f369e218b14be1c40c4527a72feeae9d6eb729d45f83ddb46a2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / simple_login_system-0.1.7-py3-none-any.whl

Download URL simple_login_system-0.1.7-py3-none-any.whl
Size 36.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae46d212d69750f235bf077bc8e5aea56e5315c224f73ed61cb04cb30868481e
BLAKE2b-256 checksum
How to use checksums
148d250d002e117add3ccbd221c96849fe43096a1cf414adcdd7abbc5459283a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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