Skip to content

Releases: iTeam-S/Ampalibe

Ampalibe v1.1.X - patch

28 Jun 15:46
Compare
Choose a tag to compare

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

16 Mar 04:13
0ef4841
Compare
Choose a tag to compare
1.2.0.1a Pre-release
Pre-release

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 😌

06 Feb 03:41
b4cfc5e
Compare
Choose a tag to compare

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

Full Changelog: 1.1.7...1.1.8.LTS

Ampalibe 1.1.7 🙄

18 Dec 05:27
e41780b
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.1.6...1.1.7

Ampalibe 1.1.6 ❤️‍🔥

01 Dec 04:56
8c1b27d
Compare
Choose a tag to compare
  • [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

Full Changelog: 1.1.5...1.1.6

Ampalibe 1.1.5 😎

06 Oct 04:31
Compare
Choose a tag to compare

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 🚀

03 Sep 20:30
Compare
Choose a tag to compare

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

20 Aug 09:58
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.1.2...1.1.3

Ampalibe v1.1.2

15 Aug 20:27
Compare
Choose a tag to compare

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

12 Aug 16:02
Compare
Choose a tag to compare
  • fix port argument doesn't work on
  • fix error when python is python3 and not python

Full Changelog: 1.1.0...1.1.1