Releases: iTeam-S/Ampalibe
Ampalibe v1.1.X - patch
Ampalibe 1.1.9
- [FIX] Error connection with PostgreSQL #98
Full Changelog: https://github.com/iTeam-S/Ampalibe/compare/1.1.8.LTS...1.1.9.patch
1.2.0.1a
Alpha version of Ampalibe 1.2.X
What's Changed
Migrate ampalibe to use asyncio instead of threading by @gaetan1903 in #91
You can now use an async/await for your function decorated by ampalibe if needed,
import ampalibe
import asyncio
@amaplibe.command('/')
async def main(**ext):
await asyncio.sleep(3)
...
Fix ampalibe batch command exiting on cmd by @rootkit7628 in #93
Add Admin Interface for ampalibe CRUD by @gaetan1903 in #92
You can enable admin interface for Ampalibe by adding ADMIN_ENABLE = 1
in your conf file.
You can create a database model using SQLModel
# -- file: model.py
from datetime import datetime
from sqlmodel import Field, SQLModel
class AmpalibeUser(SQLModel, table=True):
__tablename__: str = "amp_user"
id: Optional[int] = Field(default=None, primary_key=True)
user_id: str = Field(max_length=50, unique=True, nullable=False)
action: Optional[str] = None
last_use: datetime = Field(default=datetime.now(), nullable=False, index=True)
lang: Optional[str] = Field(min_length=2, max_length=3)
And to make it accessible in the ADMIN interface, create a resource for it
# -- file: resource.Py
from sqladmin import ModelView
from models import AmpalibeUser
from ampalibe import __version__, __author__
from sqladmin import BaseView, expose
# Declare here all class ofModelView or BaseView to put in Admin dahsboard
'''
Example CRUD for a table
'''
class UserAmpalibe(ModelView, model=AmpalibeUser):
name = "Ampalibe User"
icon = "fa-solid fa-user"
column_list = [
AmpalibeUser.user_id,
AmpalibeUser.action,
AmpalibeUser.last_use,
AmpalibeUser.lang,
]
can_create = True
can_edit = True
can_delete = False
can_view_details = True
You can too create a custom page ADMIN panel by adding a resource like this model
class OtherView(BaseView):
name = "Other Page"
icon = "fa-solid fa-list-alt"
@expose("/other", methods=["GET"])
def other_page(self, request):
return self.templates.TemplateResponse(
"other.html",
context={"request": request, "version": __version__, "author": __author__},
)
where the html content is like this :
< !-- file: templates/other.html -->
{% extends "layout.html" %}
{% block content %}
<div>
<h1 style="text-align: center ;">
Custom Admin Page for Ampalibe {{ version }} authored by {{ author }}
</h1>
</div>
{% endblock %}
- Introduce with async_download_file
&& async_simulate
to avoid requests blocking
if you use download_file
or simulate
function it may issue a deadlock, use async_simulate/async_download_file
instead
import ampalibe
from ampalibe import async_simulate as simulate
from ampalibe import async_download_file as download_file
@ampalibe.command('/)
async main(cmd, **ext):
if cmd.webhook == 'attachment'
await download_file(cmd)
await simulate('/test')
...
Full Changelog: 1.1.8.LTS...1.2.0.1a
Ampalibe v1.1.8 😌
Ampalibe 1.1.8
In the current development,
major structural changes are taking place, hence this LTS release which ends the Ampalibe 1.1.X series
- [ADD] Mongodb support (#76)
- [IMP] Code quality (#87) (6a69579)
- [IMP] Optimize time for translate function (#77)
- [IMP] Change temporary data management (#78)
- [FIX] translate encoding in windows (af9e1fb)
- [ADD] New Messenger API: send_product_template (#79)
- [FIX] --dev doesn't work anymore on windows (af7aba3)
- [ADD] One time notification Messenger API (#80)
- [IMP] fix & imrpov structure (#81)
- [IMP] Improve core readability (#82) (#83)
- [FIX] Logger , printing twice (#86)
- [IMP] Model optimisation (#88)
- [IMP] Minor syntax style (#89)
What's Changed
- Mongodb support by @gaetan1903 in #76
- [IMP] Optimize time for translate function by @gaetan1903 in #77
- [IMP] Change temporary data management by @gaetan1903 in #78
- [ADD] New Messenger API: send_product_template by @gaetan1903 in #79
- One time notification by @rootkit7628 in #80
- [IMP] Minor fix & imrpov in structure by @gaetan1903 in #81
- Improve core readability by @gaetan1903 in #82
- [IMP] Normalization
by @gaetan1903 in #83 - [FIX] Logger , printing twice by @rivo2302 in #86
- Minor improv by @gaetan1903 in #87
- [IMP] Model optimisation by @gaetan1903 in #88
- [IMP] Minor syntax style by @gaetan1903 in #89
- bump to 1.1.8 by @gaetan1903 in #90
Full Changelog: 1.1.7...1.1.8.LTS
Ampalibe 1.1.7 🙄
What's Changed
- [IMP] Logger feature by @rivo2302 in #71
- [IMP] Make Sqlite support type datetime by @gaetan1903 in #72
- [IMP] send return data in after_run function by @gaetan1903 in #73
- [IMP] Readability and maintainability by @gaetan1903 in #74
- [IMP] Avoid quick_rep params erase next quick_rep by @gaetan1903 in (9d7a934)
- bump to 1.1.7 by @gaetan1903 in #75
Full Changelog: 1.1.6...1.1.7
Ampalibe 1.1.6 ❤️🔥
- [IMP] Add argument reusable in send_file & send_file_url
- [ADD] send_attachment SEND API (sending reusable file)
- [FEAT] Personas management send API (create, list, get, delete) by @rivo2302
- [ADD] new messenger api : send receipt template by @rootkit7628
- [FIX] attachments not received in function reported by @SergioDev22
- [IMP] unit test for receiving attachment
- [ADD] decorator before_receive & after_receive message
- [ADD] get_user_profile SEND API
What's Changed
- Add reusable file to optimize number of send_file by @gaetan1903 in #65
- [FEAT] Messenger API : Manage personas by @rivo2302 in #66
- [ADD] new messenger api : send receipt template by @rootkit7628 in #67
- [FEAT] Ajout d'un script before_after message by @gaetan1903 in #68
- Majdoc by @gaetan1903 in #69
- [RELEASE] Bump to 1.1.6 by @gaetan1903 in #70
Full Changelog: 1.1.5...1.1.6
Ampalibe 1.1.5 😎
Ampalibe 1.1.5
- [IMP] Data integrity for UI & Messenger by @gaetan1903 in #56
- [FIX] quick_rep don't support in Element by @SergioDev22 in f805455
- [IMP] Add specific type for attachments by @gaetan1903 in #62
- [IMP] stringify Payload object to output by @gaetan1903 in #62
- [ADD][IMP] Full functionnality
send_message
API by @gaetan1903 in #63 - [ADD] Unit Test for messenger_api
- [ADD] Unit Test for ampalibe CLI
- [IMP] Documentation improved
Full Changelog: 1.1.4...1.1.5
Ampalibe 1.1.4 🚀
What's Changed
- 🔧 [FIX] Fix send quick reply missing 13th with next argument by @rootkit7628 in #47
- 🔧 [FIX] send_buttons error by @gaetan1903 in ec865f7
- 🚀 [FIX][IMP] Many fixes & improvements by @gaetan1903 in #55
- 🚀 [IMP][FIX] Verification db connection in b6b18ec
- 🚀 [IMP] Remove unnecessary instructions by @gaetan1903 in #48
- 🚀 [IMP] Preserve the built-in type of data sent on Payload Management by @gaetan1903 in #50
- ➕ [ADD] Create requirements on init and create by @rootkit7628 in #51
- 🌟 [FEAT] Object Payload sent in action by @gaetan1903 in #54
Full Changelog: 1.1.3...1.1.4
Ampalibe 1.1.3-stable
What's Changed
- [FIX] route not recognized in Payload Object by @gaetan1903 in #42
- [FIX] Fix persistent menu Button not Jsonserialized by @rootkit7628 in #45
- [REF] Payload Generation in Ampalibe UI Object by @rootkit7628 in #45
- [ADD] Functionnal test in CI by @gaetan1903 in #46
Full Changelog: 1.1.2...1.1.3
Ampalibe v1.1.2
Ampalibe framework 1.1.2
pip install -U ampalibe
- [IMP] Add indication in dockerfile
- [FIX] Payload object instead of dict in quick_replies when build Element
- [FIX] Fix Typo in Ampalibe definition
- [FIX] Missing gitignore file on create & init
- [IMP] Adapt ASGI server to be supported by Heroku/python image
- [IMP] Command decorators priority before action decorators in ampalibe core
What's Changed
- [FIX] Missing gitignore file on create & init by @rootkit7628 in #40
- [FIX] Command decorators function before action decorators by @rivo2302 in #41
Full Changelog: 1.1.1...1.1.2
Ampalibe v1.1.1 patch
- fix port argument doesn't work on
- fix error when python is python3 and not python
Full Changelog: 1.1.0...1.1.1