hungerlib 2.1.2.dev0__py3-none-any.whl → 2.2.dev0__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.
examples/Config.py ADDED
@@ -0,0 +1,45 @@
1
+ from hungerlib import Config
2
+ from pathlib import Path
3
+ from hungerlib.addons.colormap import ASCI_COLOR_MAP, MC_COLOR_MAP
4
+
5
+ DefaultConfig = Config(
6
+ # --- Panel settings ---
7
+ panel_name="My Panel",
8
+ panel_url="https://example.com",
9
+ panel_api_key='API_KEY_HERE',
10
+
11
+ # --- Generic server settings ---
12
+ gs_name='My Server',
13
+ gs_panel_url='https://example.com',
14
+ gs_panel_api_key='API_KEY_HERE',
15
+ gs_server_id='SERVER_ID_HERE',
16
+
17
+ # --- Minecraft server settings ---
18
+ mc_name='My Minecraft Server',
19
+ mc_panel_url='https://example.com',
20
+ mc_panel_api_key='API_KEY_HERE',
21
+ mc_server_id='SERVER_ID_HERE',
22
+ mc_server_domain='mc.example.com',
23
+ mc_server_port=25565,
24
+ mc_rcon_port=25575,
25
+ mc_rcon_password='RCON_PASSWORD_HERE',
26
+ mc_tpsCommand='tt20 tps',
27
+
28
+ # Color maps
29
+ file_color_map=None,
30
+ origin_color_map=ASCI_COLOR_MAP.copy(),
31
+ destination_color_map=ASCI_COLOR_MAP.copy(),
32
+ mc_color_map=MC_COLOR_MAP.copy(),
33
+
34
+
35
+ # --- Prefixes ---
36
+ info_prefix='<white>[INFO]: ',
37
+ warn_prefix='<yellow>[WARN]: ',
38
+ error_prefix='<red>[ERROR]: ',
39
+ console_backspaces=8,
40
+
41
+ # --- Logging ---
42
+ log_path=Path("/home/container/logs"),
43
+ log_destination_method='rcon',
44
+
45
+ )
hungerlib/__init__.py CHANGED
@@ -18,7 +18,6 @@ _EXPORTS = {
18
18
 
19
19
  # core module utilities
20
20
  "Panel": ('panel', 'Panel'),
21
- 'DefaultConfig': ('config', 'DefaultConfig'),
22
21
  'Config': ('config', 'Config'),
23
22
  'HungerLogger': ('logger', 'HungerLogger'),
24
23
  "snapSchedule": ("scheduler", "snapSchedule"),
hungerlib/config.py CHANGED
@@ -14,7 +14,6 @@ class Config:
14
14
  panel_name: str | None = None
15
15
  panel_url: str | None = None
16
16
  panel_api_key: str | None = None
17
- panel_headers: dict | None = None
18
17
 
19
18
  # generic server defaults
20
19
  gs_name: str | None = None
@@ -45,8 +44,7 @@ class Config:
45
44
  error_prefix: str = '<red>[ERROR]: '
46
45
  console_backspaces: int = 8
47
46
 
47
+ # Logging
48
48
  log_path: Path = Path("/home/container/logs")
49
49
  log_destination_method: str = 'rcon'
50
-
51
- # built-in default configuration
52
- DefaultConfig = Config()
50
+
hungerlib/panel.py CHANGED
@@ -34,10 +34,6 @@ class Panel:
34
34
  # http core
35
35
  @property
36
36
  def headers(self):
37
- if self.Config and self.Config.panel_headers:
38
- return self.Config.panel_headers
39
-
40
-
41
37
  return {
42
38
  "Authorization": f"Bearer {self.api_key}",
43
39
  "Accept": "application/json",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hungerlib
3
- Version: 2.1.2.dev0
3
+ Version: 2.2.dev0
4
4
  Summary: Powerful automation library for Pterodactyl.
5
5
  Author: iFamished
6
6
  License: MIT
@@ -1,8 +1,9 @@
1
- hungerlib/__init__.py,sha256=JT5msjlG5-Tzv3JL2-KXvIS7N01NTywlwTXJbGgCI_g,2310
2
- hungerlib/config.py,sha256=vZBJEAl5i2FJGWkx_S9D3s9Em81gik3C7cPTb1znPT4,1734
1
+ examples/Config.py,sha256=JM7ocbFiKDYbHCA8gosjsvc50B_zI40pdl13Kn8qRRk,1241
2
+ hungerlib/__init__.py,sha256=Od5O_iSCT5KX3iIaOBCUiTzsdSMTS44aYry71fvymZQ,2260
3
+ hungerlib/config.py,sha256=MvOthvbvy-7_VyHL_jcgdGkLgxV-5rcTmpRwBNa_Va8,1655
3
4
  hungerlib/logger.py,sha256=GK3UzcwLf9wz-snBY8y5SVQcuOYTqBAxY3RGjHuVbXs,3757
4
5
  hungerlib/mchelpers.py,sha256=PuENTlzwPIBHymlmdynMK28CCy_l8x8yzJSzaguvMMM,3789
5
- hungerlib/panel.py,sha256=H7HEvBqw3i2WUu6ehI388NpXfLV7hvPxeeP1V44TZ8Q,2507
6
+ hungerlib/panel.py,sha256=1ZcSFB5ydretmo1vzc2HXNFFE0V5U5zGQra9exmc1kY,2406
6
7
  hungerlib/scheduler.py,sha256=40WcKF5Bc4Fmx-pviZuWA4GkNwrn8RP_TupA00SwD2A,890
7
8
  hungerlib/addons/_generic.py,sha256=jUuoV7nlvApQBmtOkVbD2B5SkA2b2SUx5fGlpfZRT9Y,2851
8
9
  hungerlib/addons/colormap.py,sha256=s3GGE2g6xfRTsJdGnevFJ9tyaY0pDpX8pnxvv013fl8,1072
@@ -16,9 +17,8 @@ hungerlib/api/schedule.py,sha256=3gdl0jiIOScdVXWy4aOef-KIoKqUopbI8b1dPgXf5Vg,953
16
17
  hungerlib/api/startup.py,sha256=hKhBjpLMVYa3jjq6ahqm2N32B_fu-bZnOJTZ-P57v4M,434
17
18
  hungerlib/servers/_generic.py,sha256=M_SxBVC8Zz4yMJ5tktyMIWXZIhZC9tuxs3hxvBzmcXE,7060
18
19
  hungerlib/servers/minecraft.py,sha256=EhjGxwPKMOB9eVieMr-cQaN506anTDvpAKlF0D6Avss,2792
19
- hungerlib-2.1.2.dev0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
20
- tests/test_imports.py,sha256=yLxO56vXLmUOqU09yJTJs5Tc1RB58_2ctUcfRevZDDM,122
21
- hungerlib-2.1.2.dev0.dist-info/METADATA,sha256=MqIUGfTyo0VFyeHRTyAaIDz8a31OHXllA5_n7ZSF26g,1516
22
- hungerlib-2.1.2.dev0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
23
- hungerlib-2.1.2.dev0.dist-info/top_level.txt,sha256=Lt7910sEdIIiCc13B-GiHur4qXeEIfqLj6ut1noLGNw,16
24
- hungerlib-2.1.2.dev0.dist-info/RECORD,,
20
+ hungerlib-2.2.dev0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
21
+ hungerlib-2.2.dev0.dist-info/METADATA,sha256=vReYfVvCTAljzbCCHc3CSZcxbS6qrOymxJIuTig_9Hk,1514
22
+ hungerlib-2.2.dev0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
23
+ hungerlib-2.2.dev0.dist-info/top_level.txt,sha256=-oFAkOTGMfuvp0CBu82Ltag3EZwIqb663p_fymgcaqI,19
24
+ hungerlib-2.2.dev0.dist-info/RECORD,,
@@ -1,2 +1,2 @@
1
+ examples
1
2
  hungerlib
2
- tests
tests/test_imports.py DELETED
@@ -1,5 +0,0 @@
1
- # Mainly a stub as of right now
2
-
3
- def test_imports():
4
- import hungerlib
5
- from hungerlib import MinecraftServer, Panel