dswebhook 0.2.4__tar.gz → 0.2.5__tar.gz

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: dswebhook
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Lib for easy use of discord webhook
5
5
  Author: Beks1k
6
6
  Requires-Python: >=3.8
@@ -15,7 +15,6 @@ A minimal and efficient Python wrapper for managing and sending messages to mult
15
15
 
16
16
  ## Exceptions
17
17
 
18
- The module imports exceptions from an external `exceptions` file:
19
18
 
20
19
  - **`InvalidURL`**: Raised if the URL string is empty or missing.
21
20
  - **`AlreadyExists`**: Raised if you try to register a URL on an ID that is already taken.
@@ -4,7 +4,6 @@ A minimal and efficient Python wrapper for managing and sending messages to mult
4
4
 
5
5
  ## Exceptions
6
6
 
7
- The module imports exceptions from an external `exceptions` file:
8
7
 
9
8
  - **`InvalidURL`**: Raised if the URL string is empty or missing.
10
9
  - **`AlreadyExists`**: Raised if you try to register a URL on an ID that is already taken.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dswebhook"
7
- version = "0.2.4"
7
+ version = "0.2.5"
8
8
  readme = "README.md"
9
9
  description = "Lib for easy use of discord webhook"
10
10
  requires-python = ">=3.8"
@@ -1,9 +1,45 @@
1
1
  import requests
2
2
 
3
- from exceptions import (
4
- InvalidURL, SchemaError, AlreadyExists, NoSuchID,
5
- ContentTooLarge, ConnectionError, BadRequest, InternalServerError, HTTPError, NotJSON
6
- )
3
+ class BadRequest(Exception):
4
+ '''When 400 hits in'''
5
+ pass
6
+
7
+ class InternalServerError(Exception):
8
+ '''When 500 hits in'''
9
+ pass
10
+
11
+ class InvalidURL(Exception):
12
+ '''When Invalid url is given'''
13
+ pass
14
+
15
+ class ContentTooLarge(Exception):
16
+ '''When Given content bigger than 2000'''
17
+ pass
18
+
19
+ class ConnectionError(Exception):
20
+ '''When Connection error accures such as no inter net etc.'''
21
+ pass
22
+
23
+ class SchemaError(Exception):
24
+ '''When schema not right'''
25
+ pass
26
+
27
+ class NoSuchID(Exception):
28
+ '''When id is not found in urlr'''
29
+ pass
30
+
31
+ class AlreadyExists(Exception):
32
+ '''When id is already exists in urlr'''
33
+ pass
34
+
35
+ class HTTPError(Exception):
36
+ '''When other HTTP error accures'''
37
+ pass
38
+
39
+ class NotJSON(Exception):
40
+ '''If customJSON is not a dictionary'''
41
+ pass
42
+
7
43
  urlr = {}
8
44
 
9
45
  def init(url:str, id=1):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dswebhook
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Lib for easy use of discord webhook
5
5
  Author: Beks1k
6
6
  Requires-Python: >=3.8
@@ -15,7 +15,6 @@ A minimal and efficient Python wrapper for managing and sending messages to mult
15
15
 
16
16
  ## Exceptions
17
17
 
18
- The module imports exceptions from an external `exceptions` file:
19
18
 
20
19
  - **`InvalidURL`**: Raised if the URL string is empty or missing.
21
20
  - **`AlreadyExists`**: Raised if you try to register a URL on an ID that is already taken.
@@ -1,7 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
- src/exceptions.py
5
4
  src/dswebhook/__init__.py
6
5
  src/dswebhook/dswebhook.py
7
6
  src/dswebhook.egg-info/PKG-INFO
@@ -0,0 +1 @@
1
+ dswebhook
@@ -1,2 +0,0 @@
1
- dswebhook
2
- exceptions
@@ -1,39 +0,0 @@
1
- class BadRequest(Exception):
2
- '''When 400 hits in'''
3
- pass
4
-
5
- class InternalServerError(Exception):
6
- '''When 500 hits in'''
7
- pass
8
-
9
- class InvalidURL(Exception):
10
- '''When Invalid url is given'''
11
- pass
12
-
13
- class ContentTooLarge(Exception):
14
- '''When Given content bigger than 2000'''
15
- pass
16
-
17
- class ConnectionError(Exception):
18
- '''When Connection error accures such as no inter net etc.'''
19
- pass
20
-
21
- class SchemaError(Exception):
22
- '''When schema not right'''
23
- pass
24
-
25
- class NoSuchID(Exception):
26
- '''When id is not found in urlr'''
27
- pass
28
-
29
- class AlreadyExists(Exception):
30
- '''When id is already exists in urlr'''
31
- pass
32
-
33
- class HTTPError(Exception):
34
- '''When other HTTP error accures'''
35
- pass
36
-
37
- class NotJSON(Exception):
38
- '''If customJSON is not a dictionary'''
39
- pass
File without changes
File without changes