pyrobale 0.2.2__py3-none-any.whl → 0.2.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyrobale
3
- Version: 0.2.2
3
+ Version: 0.2.8
4
4
  Summary: A python wrapper for bale api
5
5
  Project-URL: github, https://github.com/pyrobale/pyrobale
6
6
  Project-URL: website, https://pyrobale.github.io
@@ -678,12 +678,16 @@ License: GNU GENERAL PUBLIC LICENSE
678
678
  may consider it more useful to permit linking proprietary applications with
679
679
  the library. If this is what you want to do, use the GNU Lesser General
680
680
  Public License instead of this License. But first, please read
681
+ <<<<<<< HEAD
681
682
  <https://www.gnu.org/licenses/why-not-lgpl.html>.
683
+ =======
684
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
685
+ >>>>>>> a5043d5a348e3fb8d7f8faf92c8a566bc05b9d84
682
686
  License-File: LICENSE
683
687
  Classifier: License :: OSI Approved :: MIT License
684
688
  Classifier: Operating System :: OS Independent
685
689
  Classifier: Programming Language :: Python :: 3
686
- Requires-Python: >=3.8
690
+ Requires-Python: >=3.9
687
691
  Description-Content-Type: text/markdown
688
692
 
689
693
  ![pyrobaletext](https://raw.githubusercontent.com/pyrobale/pyrobale/refs/heads/main/pyrobaletext.png)
@@ -715,13 +719,11 @@ A Python wrapper for the Bale Bot API that makes it easy to build Bale bots.
715
719
 
716
720
  ## Installation
717
721
 
718
-
719
- pip install pyrobale
720
-
722
+ ``pip install pyrobale``
721
723
 
722
724
  ## Quick Start
723
725
 
724
-
726
+ ```py
725
727
  from bale import Client, MenuKeyboardMarkup, MenuKeyboardButton
726
728
 
727
729
  # Initialize bot with token
@@ -734,93 +736,98 @@ def handle_message(message):
734
736
  # Create keyboard
735
737
  keyboard = MenuKeyboardMarkup()
736
738
  keyboard.add(MenuKeyboardButton("Hello!"))
737
-
739
+
738
740
  # Send welcome message
739
741
  message.reply_message("Welcome!", reply_markup=keyboard)
740
742
 
741
743
  # Start the bot
742
744
  bot.run()
743
-
745
+ ```
744
746
 
745
747
  ## Key Components
746
748
 
747
749
  ### Client
750
+
748
751
  The main class for interacting with Bale API. Handles all API requests and provides event decorators.
749
752
 
750
753
  ### Message
754
+
751
755
  Represents a message in Bale with methods for replying, editing, and deleting messages.
752
756
 
753
757
  ### User
758
+
754
759
  Represents a Bale user with their properties and methods.
755
760
 
756
761
  ### Chat
762
+
757
763
  Represents a chat conversation with methods for sending messages and managing chat settings.
758
764
 
759
765
  ### Keyboards
766
+
760
767
  - `MenuKeyboardMarkup`: For creating text keyboards
761
768
  - `InlineKeyboardMarkup`: For creating inline keyboards
762
769
 
763
770
  ### Database
771
+
764
772
  Built-in SQLite database support for storing persistent data.
765
773
 
766
774
  ## Event Handlers
767
775
 
768
-
769
776
  # Message handler
777
+
778
+ ```python
770
779
  @bot.on_message
771
780
  def handle_message(message):
772
781
  pass
782
+ ```
773
783
 
774
784
  # Callback query handler
785
+
786
+ ```python
775
787
  @bot.on_callback_query
776
788
  def handle_callback(callback):
777
789
  pass
790
+ ```
778
791
 
779
792
  # Periodic task handler
793
+
794
+ ```python
780
795
  @bot.on_tick(60) # Runs every 60 seconds
781
796
  def handle_tick():
782
797
  pass
798
+ ```
783
799
 
784
800
  # Ready event handler
801
+
802
+ ```python
785
803
  @bot.on_ready
786
804
  def handle_ready():
787
805
  pass
806
+ ```
788
807
 
789
808
  # Member join handler
809
+
810
+ ```python
790
811
  @bot.on_member_chat_join
791
812
  def handle_join(message, chat, user):
792
813
  pass
814
+ ```
793
815
 
794
816
  # Member leave handler
817
+
818
+ ```python
795
819
  @bot.on_member_chat_leave
796
820
  def handle_leave(message, chat, user):
797
821
  pass
798
-
822
+ ```
799
823
 
800
824
  ## Database Usage
801
825
 
802
-
803
826
  # Access database
827
+
804
828
  ```py
805
829
  with bot.database as db:
806
830
  db.write_key("user_123", {"points": 100})
807
-
831
+
808
832
  data = db.read_key("user_123")
809
833
  ```
810
-
811
-
812
- ## Running Multiple Bots
813
-
814
-
815
- ```py
816
- from bale import run_multiple_clients
817
-
818
- bot1 = Client("TOKEN1")
819
- bot2 = Client("TOKEN2")
820
-
821
- run_multiple_clients(bot1, bot2)```
822
-
823
-
824
- ## License
825
-
826
- This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,5 @@
1
+ pyrobale.py,sha256=Nb4HcO5aydJbc6Ofwz60PtZpLAh0Obx_IT4YydUeFgw,84787
2
+ pyrobale-0.2.8.dist-info/METADATA,sha256=DjHaCavEk_o0UZI_eLqTRzDzHSTV7V85LI3ifOWOrT0,43668
3
+ pyrobale-0.2.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
+ pyrobale-0.2.8.dist-info/licenses/LICENSE,sha256=XQsvifC5HE85232_XgRHpeQ35MfeL2YcpU4yPiAgmW4,35269
5
+ pyrobale-0.2.8.dist-info/RECORD,,
@@ -671,4 +671,8 @@ into proprietary programs. If your program is a subroutine library, you
671
671
  may consider it more useful to permit linking proprietary applications with
672
672
  the library. If this is what you want to do, use the GNU Lesser General
673
673
  Public License instead of this License. But first, please read
674
- <https://www.gnu.org/licenses/why-not-lgpl.html>.
674
+ <<<<<<< HEAD
675
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
676
+ =======
677
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
678
+ >>>>>>> a5043d5a348e3fb8d7f8faf92c8a566bc05b9d84