Skip to content
/ Pyneer Public template

Pyneer is a minimal scaffolding designed to help students with their school's Python assignments.

License

Notifications You must be signed in to change notification settings

jameswong3388/Pyneer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

Pyneer is a minimal scaffolding designed to help students with their school's Python assignments.

Pyneer comes with minimal scaffolding as well as basic authentication and admin functionality to help you quickly get started with your project. It comes with a MongoDB-like API out of the box, so you can focus on what's important to be done !

Make sure to give it a ⭐ if you like the project 👍.

Requirement

python - ^3.10*

Installation

Make sure you have git installed to clone the project or download the zip file.

git clone https://github.com/jameswong3388/Pyneer.git

Project Structure Overview

.
├── main.py
├── app
│   └── helpers.py
├── api
│   ├── __init__.py
│   └── pyneer
│       └── db
│           ├── __init__.py
│           └── handlers
├── database
│   ├── db.json
│   └── db.txt
└── pages
    ├── admin.py
    ├── auth.py
    └── user.py

main.py - Here is where Pyneer is initialized.

\app - Here contain all of your application logic.

\api - Here contain all the API-related files, and all of Pyneer's APIs are here.

\database - Here contain the database related file, Pyneer supports .json and .txt file.

\pages - Here contain your pages, and all of Pyneer's scaffolding pages are here.

API overview

db.* - With Pyneer's database API, you can easily execute CRUD operations on your database. Pyneer uses db.json as the database file by default, but you can easily change it when calling the APIs.

Documentation

You can find more detailed API documentation in \api\pyneer\db\__init__.py or here.

Usage

# An example using Pyneer's `db.*` API to create a new user
from api.pyneer import db

# Create a new database
a = db.create_db("database/users.json")

# Return: {"action": True}

# Create a new collection
b = db.create_collection("database/users.json", "users")

# Return: {"action": True}

# Create a new user
c = db.insert_one(collection="users", document={
    "username": "jameswong3388",
    "password": "password",
    "email": "[email protected]",
    "age": 18,
    "gender": 'm'
}, db_path="users/db.json")

# Return: {'action': True, '_id': '6b0baf4d-5ddf-5f55-869c-5d8f9ba3f923'}

Running the project

To run the project, simply run main.py with python or python3.

python main.py

Bugs and Issues

If you find any bugs or issues, please report it to the issue tracker

About

Pyneer is a minimal scaffolding designed to help students with their school's Python assignments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages