Code Monkey home page Code Monkey logo

aclimate_orm's Introduction

ORM ACLIMATE

GitHub release (latest by date)

Features

  • Built using Mongoengine for MongoDB
  • Supports Python 3.x

Getting Started

To use this Models, it is necessary to have an instance of MongoDB running.

Prerequisites

  • Python 3.x
  • MongoDB

Usage

This ORM can be used as a library in other Python projects. The models are located in the my_orm/models folder, and can be imported like any other Python module. To install this orm as a library you need to execute the following command:

pip install git+https://github.com/CIAT-DAPA/aclimate_orm

If you want to download a specific version of orm you can do so by indicating the version tag (@v0.0.0) at the end of the install command

pip install git+https://github.com/CIAT-DAPA/[email protected]

Test

python -m unittest discover -s ./src/tests/ -p 'test_*.py'

Models

Users

Represents a User in the database.

Attributes:

  • id: ObjectId - Id of the user.
  • Username: str - User's username.
  • NormalizedUserName: str - Normalized username.
  • Email: str - User's email address.
  • NormalizedEmail: str - Normalized email address.
  • EmailConfirmed: bool - Indicates whether the user's email has been confirmed. Default is False.
  • PasswordHash: str - Hashed password for the user.
  • SecurityStamp: str - A random value that should change whenever a user's credentials have changed.
  • ConcurrencyStamp: str - A value used for optimistic concurrency, ensuring updates are not based on stale data.
  • PhoneNumber: str - User's phone number.
  • PhoneNumberConfirmed: bool - Indicates whether the user's phone number has been confirmed. Default is False.
  • TwoFactorEnabled: bool - Indicates whether two-factor authentication is enabled for the user. Default is False.
  • LockoutEnd: str - Date and time in string format when the user's lockout period will end.
  • LockoutEnabled: bool - Indicates whether lockout is enabled for the user. Default is True.
  • AccessFailedCount: int - Number of failed access attempts.
  • AuthenticatorKey: str - Key used for two-factor authentication.
  • Roles: List - List of roles assigned to the user.
  • Claims: List - List of claims associated with the user.
  • Logins: List - List of external logins linked to the user.
  • Tokens: List - List of tokens associated with the user.
  • RecoveryCodes: List - List of recovery codes for two-factor authentication recovery.

Methods:

  • save(): Saves the User object to the database.
  • delete(): Deletes the User object from the database.

Roles

Represents a Rol entry in the database.

Attributes:

  • _id: StringField - Id of the user. (Primary Key)
  • Name: StringField - User's name. (Required)
  • NormalizedName: StringField - Normalized name.
  • ConcurrencyStamp: StringField - A value used for optimistic concurrency, ensuring updates are not based on stale data. (Required)

Methods:

  • save(): Saves the Rol object to the database.
  • delete(): Deletes the Rol object from the database.

aclimate_orm's People

Contributors

carlosnasayo avatar github-actions[bot] avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.