Skip to main content

A command client for CELA.

Project description

[!IMPORTANT]

This project is still working in progress. Please go to CAT or CHEMEX for using in production.

Cela

English | 简体中文

Cela is an asset management system with front-end and back-end separation, and provides a command-line client. Users can use the command-line client to manage assets, or use their own built front-end program.

Cela has the following features:

  • User authentication using bearer token.
  • Permission control using scopes and RBAC.
  • Efficient deployment mode, deployed in a containerized way.
  • Convenient secondary development, users only need to focus on the implementation of business logic.
  • Complete test cases.
  • Inherited from the design pattern of chemex and cat.
  • ...

Quick Start

Start back-end service with checking docker-compose.yml and run the following:

docker-compose up -d

And then you need to GET http://localhost:8000/auth/init to initialize the admin.

Now you can visit http://localhost:8000/docs to view the API documentation.

Or running pip install cela to install the command-line client, and then you can use the command-line client:

cela connect http://localhost:8000
cela login admin admin
cela device list

Directory Structure

cela
├── app                                       # The main directory of the project   ├── config                                # Configuration file directory      ├── __init__.py                             └── database.py                       # Database configuration file   ├── controllers                           # Controller directory      ├── __init__.py                             ├── auth_controller.py                # Authentication controller      ├── role_controller.py                # Role controller      └── user_controller.py                # User controller   ├── database                              # Database directory      ├── __init__.py              ├── crud.py                           # CRUD operation file             ├── schemas.py                        # Pydantic schema file      └── tables.py                         # SQLAlchemy table file   ├── services                              # Service directory      ├── __init__.py                             └── auth.py                           # Authentication service   ├── utils                                 # Utility directory      ├── __init__.py                             ├── config.py                         # Configuration file      ├── crypt.py                          # Cryptography tool      └── common.py                         # Common tool   ├── env.yml                               # Environment configuration file   ├── env.yml.example                       # Environment configuration file example   ├── admin.py                              # Command-line client   ├── main.py                               # Main file   └── dependencies.py                       # Dependency functions for controllers
├── tests                                     # Test directory   ├── __init__.py                              ├── functions.py                          # Test function file   └── test_xxx.py                           # Test file
├── requirements.txt                          # Dependency file
└── Dockerfile                                # Dockerfile

Contributing

If you have any suggestions or find any bugs, please feel free to submit an issue or pull request.

Code readability

Cela is not a high-performance tool, so we focus on code readability and maintainability. Please write code that is easy to read and understand.

Commit message rules

Please follow the commit message rules below when submitting a pull request:

  • Use the English language.
  • Use the imperative mood.
  • Use the present tense.
  • Use the lowercase.
  • Do not end with a period.

For example:

# we only support the following prefixes.
feat: add a new feature
fix: fix a bug
docs: update the documentation
style: change the code style
refactor: refactor the code
test: add a test case
chore: change the build process

Sponsors

Afdian.net is a platform that provides a way for creators to get support from their fans. If you like this project, you can support me on Afdian.net.

https://afdian.net/a/celaraze

Thanks

JetBrains provides excellent IDEs.

JetBrains

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cela-0.0.2a0-py2.py3-none-any.whl (37.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page