Admin Panel for GinoORM - ready to up & run (just add your models)

Overview

Gino-Admin

Gino-Admin Logo

ko-fi

Docs (state: in process): Gino-Admin docs

Play with Demo (current master 0.2.3) >>>> Gino-Admin demo <<<< (login: admin, pass: 1234)

badge1 badge2 badge3

Admin Panel for PostgreSQL DB with Gino ORM and Sanic

Table view Load Presets

How to install

    pip install gino-admin==0.2.3

How to use

You can find several code examples in examples/ folder.

Updates in version 0.2.3 (current master):

  1. Fix for the issue https://github.com/xnuinside/gino-admin/issues/35
  2. 'gino' support tables removed from menu
  3. Incremental Ids (fields) supported now in UI - they showed as disable inputs in Adding and Edit forms and not cause issue anymore.

Incremental IDs Support

  1. Checkboxes are fixed and now work correct in the "False" state.

Updates in version 0.2.2

  1. Added support for types: JSONB, JSON and Time. Examples added as part of base_example - /Users/iuliia_volkova2/work/gino-admin/examples/base_example

  2. Main update: Not needed to use gino.ext.sanic in models as it was previos.

Now you can use any ext if you need (for Fast Api for example) or pure Gino() and you not need to add to your models, any 'ifs' to have additional gino.ext.sanic to get possible work with gino admin.

All examples was changed according to the update.

  1. Sanic was updated to 20.* version. Switched to use 'request.ctx.' in code

  2. Minor things: all date, datetime and timepickers now have default value == to current time/date/datetime.

  3. Tests: was updated structure of integraion tests

Supported features

  • Auth by login/pass with cookie check
  • Create(Add new) item by one for the Model
  • Delete all rows/per element
  • Copy existed element (data table row)
  • Edit existed data (table row)
  • Search/sort in tables
  • Deepcopy element (recursive copy all rows/objects that depend on chosen as ForeignKey)
  • Upload/export data from/to CSV
  • SQL-Runner (execute SQL-queries)
  • Presets: Define order and Load to DB bunch of CSV-files
  • Init DB (Full clean up behavior: Drop tables & Recreate)
  • Composite CSV: Load multiple relative tables in one CSV-file
  • History logs on changes (log for admin panel actions - edit, delete, add, init_db, load presets and etc)
  • Support multiple users for Admin panel (add, edit, remove users from 'Admin Users' page)
  • UI Colors customizing

TODO:

  • Add possible to add new Presets from GUI
  • Select multiple rows for delete
  • Copy/deepcopy multiple items
  • Edit multiple items (?)
  • Roles for Admin Panel users (split accessess)
  • Filters in Table's columns
  • Other staff on Gino Project Dashboard

Supported Data Types

  • JSONB, JSON
  • Time, DateTime, Date
  • Boolean, String, Decimal, Numeric, Float and etc.

To see the full list of supported types take a look here: gino_admin/types.py

If you don't see type that you need - open the github issue with request and I will add it https://github.com/xnuinside/gino-admin/issues. Or you can open PR by yourself and I will be glad to review it :)

How to run Gino-Admin

Run with Cli

    gino-admin run #module_name_with_models -d postgresql://%(DB_USER):%(DB_PASSWORD)@%(DB_HOST):%(DB_PORT)/%(DB)

    gino-admin run --help # use to get cli help
    Optional params:
        -d --db
            Expected format: postgresql://%(DB_USER):%(DB_PASSWORD)@%(DB_HOST):%(DB_PORT)/%(DB)
            Example: postgresql://gino:[email protected]%gino:5432/gino (based on DB settings in examples/)
            Notice: DB credentials can be set up as  env variables with 'SANIC_' prefix
        -h --host
        -p --port
        -c --config Example:  -c "presets_folder=examples/base_example/src/csv_to_upload;some_property=1"
                    Notice: all fields that not supported in config will be ignored, like 'some_property' in example
        --no-auth  Run Admin Panel without Auth in UI
        -u --user Admin User login & password
            Expected format: login:password
            Example: admin:1234
            Notice: user also can be defined from env variable with 'SANIC_' prefix - check Auth section example

Example:

    gino-admin run examples/run_from_cli/src/db.py --db postgresql://gino:[email protected]:5432/gino -u admin:1234

Run Admin Panel as Standalone App (no matter that framework you use in main app)

You can use Gino Admin as stand alone web app. Does not matter what Framework used for your main App and that Gino Ext used to init Gino().

Code example in: examples/fastapi_as_main_app How to run example in: examples/fastapi_as_main_app/how_to_run_example.txt

You need to create admin.py (for example, you can use any name) to run admin panel:

import os

from gino_admin import create_admin_app
# import module with your models
import models 

# gino admin uses Sanic as a framework, so you can define most params as environment variables with 'SANIC_' prefix
# in example used this way to define DB credentials & login-password to admin panel

# but you can use 'db_uri' in config to define creds for Database
# check examples/colored_ui/src/app.py as example 

os.environ["SANIC_DB_HOST"] = os.getenv("DB_HOST", "localhost")
os.environ["SANIC_DB_DATABASE"] = "gino"
os.environ["SANIC_DB_USER"] = "gino"
os.environ["SANIC_DB_PASSWORD"] = "gino"


os.environ["SANIC_ADMIN_USER"] = "admin"
os.environ["SANIC_ADMIN_PASSWORD"] = "1234"

current_path = os.path.dirname(os.path.abspath(__file__))


if __name__ == "__main__":
    # host & port - will be used to up on them admin app
    # config - Gino Admin configuration - check docs to see all possible properties,
    # that allow set path to presets folder or custom_hash_method, optional parameter
    # db_models - list of db.Models classes (tables) that you want to see in Admin Panel
    create_admin_app(
        host="0.0.0.0",
        port=os.getenv("PORT", 5000),
        db=models.db,
        db_models=[models.User, models.City, models.GiftCard, models.Country],
        config={
            "presets_folder": os.path.join(current_path, "csv_to_upload")},
    )

All environment variables you can move to define in docker or .env files as you wish, they not needed to be define in '.py', this is just for example shortness.

Add Admin Panel to existed Sanic application as '/admin' route

Create in your project 'admin.py' file and use add_admin_panel from from gino_admin import add_admin_panel

Code example in: examples/base_example How to run example in: examples/base_example/how_to_run_example.txt

Example:

    from from gino_admin import add_admin_panel


    # your app code

    
    add_admin_panel(
        app, db, [User, Place, City, GiftCard], custom_hash_method=custom_hash_method
    )
        

Where:

  • 'app': your Sanic application
  • 'db' : from gino.ext.sanic import Gino; db = Gino() and
  • [User, Place, City, GiftCard] - list of models that you want to add in Admin Panel to maintain
  • custom_hash_method - optional parameter to define you own hash method to encrypt all '_hash' columns of your Models.

In admin panel _hash fields will be displayed without '_hash' prefix and fields values will be hidden like '******'

Presets

Load multiple CSV to DB in order by one click. Presets described that CSV-s files and in that order need to be loaded in DB.

Read the docs: Presets

Composite CSV to Upload

Composite CSV - one file that contains data for several relative tables.

Read the docs: Composite CSV to Upload

Config Gino Admin

Read the docs: Config

Init DB

Init DB feature used for doing full clean up DB - it drop all tables & create them after Drop for all models in Admin Panel.

Upload from CSV

Files-samples for example project can be found here: examples/base_example/src/csv_to_upload

Authorization

Read in docs: Authorization

Limitations

In current version, for correct work of Deepcopy feature in Admin Panel model MUST contain at least one unique or primary_key Column (field).

Screens:

Check in docs: UI Screens

Issues
  • jinja2.exceptions.TemplateAssertionError: no test named 'boolean'

    jinja2.exceptions.TemplateAssertionError: no test named 'boolean'

    I hit an jina2 parsing issue when using gino-admin.

    For information, my db is PostgreSQL.

    When going on one of model page or gino_admin_users, I get the following error:

    jinja2.exceptions.TemplateAssertionError: no test named 'boolean'
    

    I did find a few similar issues on different libraries but no solutions so far, do you have an idea how to solve this ?

    See trace bellow:

    Traceback (most recent call last):
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/site-packages/sanic/app.py", line 939, in handle_request
        response = await response
      File "/usr/local/lib/python3.7/site-packages/gino_admin/auth.py", line 37, in validate
        return await route(request, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/gino_admin/routes/crud.py", line 25, in model_view_table
        return await render_model_view(request, model_id)
      File "/usr/local/lib/python3.7/site-packages/gino_admin/routes/logic.py", line 60, in render_model_view
        unique=cfg.models[model_id]["identity"],
      File "/usr/local/lib/python3.7/site-packages/gino_admin/config.py", line 36, in render_with_updated_context
        self.render_string(template, request, **context),
      File "/usr/local/lib/python3.7/site-packages/sanic_jinja2/__init__.py", line 141, in render_string
        return self.env.get_template(template).render(**context)
      File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
        return original_render(self, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
        return self.environment.handle_exception(exc_info, True)
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
        raise value.with_traceback(tb)
      File "/usr/local/lib/python3.7/site-packages/gino_admin/templates/data_table.html", line 23, in template
        {% if field is boolean %}
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1005, in render
        return concat(self.root_render_func(self.new_context(vars)))
      File "/usr/local/lib/python3.7/site-packages/gino_admin/templates/model_view.html", line 14, in root
        </div>
      File "/usr/local/lib/python3.7/site-packages/gino_admin/templates/base.html", line 14, in root
      File "/usr/local/lib/python3.7/site-packages/gino_admin/templates/app.html", line 22, in root
        <script src="https://cdn.rawgit.com/mdehoog/Semantic-UI/6e6d051d47b598ebab05857545f242caf2b4b48c/dist/semantic.min.js"></script>
      File "/usr/local/lib/python3.7/site-packages/gino_admin/templates/base.html", line 31, in block_content
      File "/usr/local/lib/python3.7/site-packages/gino_admin/templates/model_view.html", line 41, in block_body
        <div class="eight wide column left aligned content" id="grid_footer_left"><br>
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 830, in get_template
        return self._load_template(name, self.make_globals(globals))
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 804, in _load_template
        template = self.loader.load(self, name, globals)
      File "/usr/local/lib/python3.7/site-packages/jinja2/loaders.py", line 125, in load
        code = environment.compile(source, name, filename)
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 591, in compile
        self.handle_exception(exc_info, source_hint=source_hint)
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
        raise value.with_traceback(tb)
      File "/usr/local/lib/python3.7/site-packages/gino_admin/templates/data_table.html", line 23, in template
        {% if field is boolean %}
      File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 543, in _generate
        optimized=self.optimized)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 82, in generate
        generator.visit(node)
      File "/usr/local/lib/python3.7/site-packages/jinja2/visitor.py", line 38, in visit
        return f(node, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 754, in visit_Template
        self.blockvisit(node.body, frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 378, in blockvisit
        self.visit(node, frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/visitor.py", line 38, in visit
        return f(node, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 1122, in visit_For
        self.blockvisit(node.body, loop_frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 378, in blockvisit
        self.visit(node, frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/visitor.py", line 38, in visit
        return f(node, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 1122, in visit_For
        self.blockvisit(node.body, loop_frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 378, in blockvisit
        self.visit(node, frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/visitor.py", line 38, in visit
        return f(node, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 1160, in visit_If
        self.blockvisit(node.body, if_frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 378, in blockvisit
        self.visit(node, frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/visitor.py", line 38, in visit
        return f(node, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 1157, in visit_If
        self.visit(node.test, if_frame)
      File "/usr/local/lib/python3.7/site-packages/jinja2/visitor.py", line 38, in visit
        return f(node, *args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 70, in new_func
        return f(self, node, frame, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 1607, in visit_Test
        self.fail('no test named %r' % node.name, node.lineno)
      File "/usr/local/lib/python3.7/site-packages/jinja2/compiler.py", line 315, in fail
        raise TemplateAssertionError(msg, lineno, self.name, self.filename)
    
    opened by mcorbe 6
  • Unable to run with uvloop

    Unable to run with uvloop

    Hey there! This is shaping up to be super useful for me. Thanks for your hard work!

    I tried to add this to my Sanic app and then to start it up with uvloop. It gives me an error because gino_admin.core.add_admin_panel tries to run it's own asyncio loop. I noticed that the function that it calls doesn't seem to have any async components. Would you accept a patch to remove the asyncio call and change gino_admin.users.add_users_model to a synchronous function?

    opened by rafmagns-skepa-dreag 3
  • Bump uvicorn from 0.11.5 to 0.11.7 in /examples/fastapi_as_main_app

    Bump uvicorn from 0.11.5 to 0.11.7 in /examples/fastapi_as_main_app

    Bumps uvicorn from 0.11.5 to 0.11.7.

    Release notes

    Sourced from uvicorn's releases.

    Version 0.11.7

    0.11.7

    • SECURITY FIX: Prevent sending invalid HTTP header names and values.
    • SECURITY FIX: Ensure path value is escaped before logging to the console.

    Version 0.11.6

    • Fix overriding the root logger.
    Changelog

    Sourced from uvicorn's changelog.

    0.11.7

    • SECURITY FIX: Prevent sending invalid HTTP header names and values.
    • SECURITY FIX: Ensure path value is escaped before logging to the console.

    0.11.6

    • Fix overriding the root logger.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • GitHub MD readme

    GitHub MD readme

    opened by xnuinside 0
  • 0.2.2 branch

    0.2.2 branch

    opened by xnuinside 0
  • 0.2.1 colored ui + fixes

    0.2.1 colored ui + fixes

    opened by xnuinside 0
  • 0.2.0 version

    0.2.0 version

    opened by xnuinside 0
  • Fix ui 0.1.1

    Fix ui 0.1.1

    opened by xnuinside 0
  • fix init_db link in template

    fix init_db link in template

    opened by ehborisov 0
  • AttributeError: 'NoneType' object has no attribute 'isoformat'

    AttributeError: 'NoneType' object has no attribute 'isoformat'

    I got this error when I tried to open the model in the admin panel File "..../venv/lib/python3.8/site-packages/gino_admin/utils.py", line 304, in get_obj_id_from_row result[x] = row[x].isoformat() AttributeError: 'NoneType' object has no attribute 'isoformat'

    model

    class Notification(db.Model): ...... created_at = db.Column( sa.DateTime, nullable=False, server_default=sa.func.now(), )

    read_at = db.Column(sa.DateTime, nullable=True)
    

    The error occurs for the read_at field, since it can be None

    https://github.com/xnuinside/gino-admin/blob/1789d63c66e808a17b1cd4c96537ba6e64d227db/gino_admin/utils.py#L304

    opened by alexeydad1 1
  • Bump fastapi from 0.54.1 to 0.65.2 in /examples/fastapi_as_main_app

    Bump fastapi from 0.54.1 to 0.65.2 in /examples/fastapi_as_main_app

    Bumps fastapi from 0.54.1 to 0.65.2.

    Release notes

    Sourced from fastapi's releases.

    0.65.2

    Security fixes

    This change fixes a CSRF security vulnerability when using cookies for authentication in path operations with JSON payloads sent by browsers.

    In versions lower than 0.65.2, FastAPI would try to read the request payload as JSON even if the content-type header sent was not set to application/json or a compatible JSON media type (e.g. application/geo+json).

    So, a request with a content type of text/plain containing JSON data would be accepted and the JSON data would be extracted.

    But requests with content type text/plain are exempt from CORS preflights, for being considered Simple requests. So, the browser would execute them right away including cookies, and the text content could be a JSON string that would be parsed and accepted by the FastAPI application.

    See CVE-2021-32677 for more details.

    Thanks to Dima Boger for the security report! 🙇🔒

    Internal

    0.65.1

    Security fixes

    0.65.0

    Breaking Changes - Upgrade

    • ⬆️ Upgrade Starlette to 0.14.2, including internal UJSONResponse migrated from Starlette. This includes several bug fixes and features from Starlette. PR #2335 by @​hanneskuettner.

    Translations

    Internal

    0.64.0

    Features

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • TypeError: 'tuple' object is not callable - while trying to delete the category

    TypeError: 'tuple' object is not callable - while trying to delete the category

    Got the following error while trying to delete data: delete_action_gino_admin

    500_internal_server_error

    [2021-05-24 20:16:18 +0400] - (sanic.access)[INFO][127.0.0.1:45260]: GET http://0.0.0.0:5000/admin/category/  200 15340
    [2021-05-24 20:16:24 +0400] [29850] [DEBUG] KeepAlive Timeout. Closing connection.
    [2021-05-24 20:16:42 +0400] [29850] [ERROR] Exception occurred while handling uri: 'http://0.0.0.0:5000/admin/category/delete/'
    Traceback (most recent call last):
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/sanic/app.py", line 724, in handle_request
        response = await response
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/auth.py", line 37, in validate
        return await route(request, *args, **kwargs)
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/routes/crud.py", line 146, in model_delete
        return await model_view_table(request, model_id, flash_message)
    TypeError: 'tuple' object is not callable
    [2021-05-24 20:16:42 +0400] - (sanic.access)[INFO][127.0.0.1:45296]: POST http://0.0.0.0:5000/admin/category/delete/  500 1837
    [2021-05-24 20:16:42 +0400] - (sanic.access)[INFO][127.0.0.1:45296]: GET http://0.0.0.0:5000/favicon.ico  404 673
    
    opened by ShahriyarR 1
  • ValueError: invalid literal for int() with base 10: '6, 2'

    ValueError: invalid literal for int() with base 10: '6, 2'

    If in the models you define Numeric type with precision and scale:

    class Product(db.Model):
        __tablename__ = 'product'
    
        id = db.Column(db.BigInteger(), primary_key=True)
        category = db.Column(db.BigInteger(), db.ForeignKey('category.id'))
        name = db.Column(db.String(), unique=True, nullable=False)
        slug = db.Column(db.String(), unique=True, nullable=False)
        description = db.Column(db.Unicode(), nullable=True)
        price = db.Column(db.Numeric(6, 2), nullable=False)
        image = db.Column(db.String(), nullable=True)
        thumbnail = db.Column(db.String(), nullable=True)
        date_added = db.Column(db.DateTime(), nullable=False)
    

    We will get:

    Traceback (most recent call last):
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/backend/app/admin.py", line 17, in <module>
        create_admin_app(
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 185, in create_admin_app
        return init_admin_app(host, port, db, db_models, config)
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 196, in init_admin_app
        add_admin_panel(app, db, db_models, **config)
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 129, in add_admin_panel
        extract_models_metadata(db, db_models)
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 97, in extract_models_metadata
        column_details = extract_column_data(model_id)
      File "/home/shako/REPOS/Learning_FastAPI/Djackets/.venv/lib/python3.9/site-packages/gino_admin/core.py", line 45, in extract_column_data
        len_ = int(str(column.type).split("(")[1].split(")")[0])
    ValueError: invalid literal for int() with base 10: '6, 2'
    
    opened by ShahriyarR 1
  • Fix UI issues. Need normal Front-end dev.

    Fix UI issues. Need normal Front-end dev.

    Hi! If you read this ticket, you know JS, HTML & css, and you want to get some practice - your welcome. UI has a lot of issues and need help to fix them.

    help wanted good first issue UI 
    opened by xnuinside 0
  • Features (Users Roles & Groups Support) :

    Features (Users Roles & Groups Support) :

    • [ ] Add admin users from DB
    • [ ] Add adding admin panel users from UI
    • [ ] Add Roles & Groups
    help wanted good first issue 
    opened by xnuinside 0
  • SQL-runner improvements

    SQL-runner improvements

    • [ ] Add controls to table with results (pagination & search)
    • [ ] Store last queries in session (for the quick re-run)
    • [ ] Add columns to result output
    help wanted good first issue 
    opened by xnuinside 0
Owner
Iuliia Volkova
Developer https://twitter.com/xnuinside | https://www.linkedin.com/in/xnuinside | https://dev.to/xnuinside
Iuliia Volkova
Monitor Python applications using Spring Boot Admin

Pyctuator Monitor Python web apps using Spring Boot Admin. Pyctuator supports Flask, FastAPI, aiohttp and Tornado. Django support is planned as well.

SolarEdge Technologies 97 Oct 22, 2021
The base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands.

The base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands.

Bruno Rocha 56 Oct 17, 2021
🤪 FastAPI + Vue构建的Mall项目后台管理

Mall项目后台管理 前段时间学习Vue写了一个移动端项目 https://www.charmcode.cn/app/mall/home 然后教程到此就结束了, 我就总感觉少点什么,计划自己着手写一套后台管理。 相关项目 移动端Mall项目源码(Vue构建): https://github.com/

王小右 93 Sep 30, 2021
row level security for FastAPI framework

Row Level Permissions for FastAPI While trying out the excellent FastApi framework there was one peace missing for me: an easy, declarative way to def

Holger Frey 187 Oct 17, 2021
Ready-to-use and customizable users management for FastAPI

FastAPI Users Ready-to-use and customizable users management for FastAPI Documentation: https://frankie567.github.io/fastapi-users/ Source Code: https

François Voron 1.3k Oct 23, 2021
Social Distancing Detector using deep learning and capable to run on edge AI devices such as NVIDIA Jetson, Google Coral, and more.

Smart Social Distancing Smart Social Distancing Introduction Getting Started Prerequisites Usage Processor Optional Parameters Configuring AWS credent

Neuralet 99 Oct 21, 2021
Auth for use with FastAPI

FastAPI Auth Pluggable auth for use with FastAPI Supports OAuth2 Password Flow Uses JWT access and refresh tokens 100% mypy and test coverage Supports

David Montague 59 Oct 6, 2021
FastAPI Skeleton App to serve machine learning models production-ready.

FastAPI Model Server Skeleton Serving machine learning models production-ready, fast, easy and secure powered by the great FastAPI by Sebastián Ramíre

null 208 Oct 20, 2021
a lightweight web framework based on fastapi

start-fastapi Version 2021, based on FastAPI, an easy-to-use web app developed upon Starlette Framework Version 2020 中文文档 Requirements python 3.6+ (fo

HiKari 61 Sep 29, 2021
Deploy an inference API on AWS (EC2) using FastAPI Docker and Github Actions

Deploy an inference API on AWS (EC2) using FastAPI Docker and Github Actions To learn more about this project: medium blog post The goal of this proje

Ahmed BESBES 26 Sep 13, 2021
Web Inventory tool, takes screenshots of webpages using Pyppeteer (headless Chrome/Chromium) and provides some extra bells & whistles to make life easier.

WitnessMe WitnessMe is primarily a Web Inventory tool inspired by Eyewitness, its also written to be extensible allowing you to create custom function

byt3bl33d3r 525 Oct 22, 2021
volunteer-database

This is the official CSM (Crowd source medical) database The What Now? We created this in light of the COVID-19 pandemic to allow volunteers to work t

null 32 Oct 9, 2021
FastAPI + Django experiment

django-fastapi-example This is an experiment to demonstrate one potential way of running FastAPI with Django. It won't be actively maintained. If you'

Jordan Eremieff 54 Sep 16, 2021
Backend, modern REST API for obtaining match and odds data crawled from multiple sites. Using FastAPI, MongoDB as database, Motor as async MongoDB client, Scrapy as crawler and Docker.

Introduction Apiestas is a project composed of a backend powered by the awesome framework FastAPI and a crawler powered by Scrapy. This project has fo

Fran Lozano 43 Oct 9, 2021
FastAPI framework plugins

Plugins for FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi-plugins FastAPI framework plugins Cache Mem

RES 163 Oct 14, 2021
Web Version of avatarify to democratize even further

Web-avatarify for image animations This is the code base for this website and its backend. This aims to bring technology closer to everyone, just by a

Carlos Andrés Álvarez Restrepo 59 Sep 9, 2021
Backend logic implementation for realworld with awesome FastAPI

Backend logic implementation for realworld with awesome FastAPI

Nik 1.4k Oct 23, 2021
基于Pytorch的脚手架项目,Celery+FastAPI+Gunicorn+Nginx+Supervisor实现服务部署,支持Docker发布

cookiecutter-pytorch-fastapi 基于Pytorch的 脚手架项目 按规范添加推理函数即可实现Celery+FastAPI+Gunicorn+Nginx+Supervisor+Docker的快速部署 Requirements Python >= 3.6 with pip in

null 12 Oct 15, 2021
MLServer

MLServer An open source inference server to serve your machine learning models. ⚠️ This is a Work in Progress. Overview MLServer aims to provide an ea

Seldon 89 Oct 17, 2021