csctracker-queue-scheduler 24.1.1__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.
Files changed (21) hide show
  1. csctracker-queue-scheduler-24.1.1/LICENSE +20 -0
  2. csctracker-queue-scheduler-24.1.1/PKG-INFO +71 -0
  3. csctracker-queue-scheduler-24.1.1/README.md +56 -0
  4. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/__init__.py +0 -0
  5. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/models/__init__.py +0 -0
  6. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/models/base_dto.py +25 -0
  7. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/models/enums/__init__.py +0 -0
  8. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/models/enums/time_unit.py +10 -0
  9. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/models/generic_data_dto.py +8 -0
  10. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/services/__init__.py +3 -0
  11. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/services/queue_service.py +82 -0
  12. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/services/scheduler_service.py +117 -0
  13. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/utils/__init__.py +3 -0
  14. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler/utils/utils.py +39 -0
  15. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler.egg-info/PKG-INFO +71 -0
  16. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler.egg-info/SOURCES.txt +20 -0
  17. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler.egg-info/dependency_links.txt +1 -0
  18. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler.egg-info/requires.txt +2 -0
  19. csctracker-queue-scheduler-24.1.1/csctracker_queue_scheduler.egg-info/top_level.txt +1 -0
  20. csctracker-queue-scheduler-24.1.1/setup.cfg +7 -0
  21. csctracker-queue-scheduler-24.1.1/setup.py +32 -0
@@ -0,0 +1,20 @@
1
+ copyright (c) 2020 Coding Kitties
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.1
2
+ Name: csctracker-queue-scheduler
3
+ Version: 24.1.1
4
+ Summary: A library for handle scheduled jobs.
5
+ Home-page: https://github.com/krlsedu/CscTrackerQueueScheduler.git
6
+ Author: Carlos Eduardo
7
+ License: MIT
8
+ Description: # CscTrackerQueueScheduler
9
+
10
+ This project is a Python job scheduling and queuing library. It allows jobs to be scheduled to run at specific periods
11
+ and queues these jobs for execution.
12
+
13
+ ## Key Features
14
+
15
+ - **Job Scheduling**: The Scheduler service (`SchedulerService`) allows jobs to be scheduled for execution at specified
16
+ intervals. It supports intervals in seconds, minutes, hours, days, and weeks, as well as daily scheduling at a
17
+ specific time.
18
+
19
+ - **Queue Service**: Scheduled tasks are put in a queue (`QueueService`) for execution. Tasks can be queued with or
20
+ without priority, which determines their order of execution.
21
+
22
+ ## Installing
23
+
24
+ Install and update using pip:
25
+
26
+ ```
27
+ pip install csctracker-queue-scheduler
28
+ ```
29
+
30
+ ## Documentation and Examples
31
+
32
+ COMING SOON
33
+
34
+ ## Simple Example
35
+
36
+ ```python
37
+ from csctracker_queue_scheduler.models.enums.time_unit import TimeUnit
38
+ from csctracker_queue_scheduler.services.queue_service import QueueService
39
+ from csctracker_queue_scheduler.services.scheduler_service import SchedulerService
40
+
41
+
42
+ def my_function(): print("Hello, world!")
43
+
44
+
45
+ scheduler = SchedulerService(queue_service=QueueService(), services=[])
46
+ scheduler.start_scheduled_job(
47
+ function=my_function, period=5, time_unit=TimeUnit.MINUTES)
48
+ ```
49
+
50
+ In the above example, `my_function` would be scheduled to run every 5 minutes.
51
+
52
+ ## Testing
53
+
54
+ Currently, this project does not have automated tests. They may be added in the future as needed.
55
+
56
+ ## Contributing
57
+
58
+ If you would like to contribute to this project, feel free to fork the repository, make your changes, and propose a pull
59
+ request.
60
+
61
+ ## License
62
+
63
+ This project is under the MIT license. Please refer to the `LICENSE` file for more details.
64
+ Keywords: queue,scheduled,scheduler
65
+ Platform: UNKNOWN
66
+ Classifier: Intended Audience :: Developers
67
+ Classifier: Programming Language :: Python :: 3
68
+ Classifier: Programming Language :: Python :: 3.9
69
+ Classifier: Topic :: Software Development
70
+ Requires-Python: >=3
71
+ Description-Content-Type: text/markdown
@@ -0,0 +1,56 @@
1
+ # CscTrackerQueueScheduler
2
+
3
+ This project is a Python job scheduling and queuing library. It allows jobs to be scheduled to run at specific periods
4
+ and queues these jobs for execution.
5
+
6
+ ## Key Features
7
+
8
+ - **Job Scheduling**: The Scheduler service (`SchedulerService`) allows jobs to be scheduled for execution at specified
9
+ intervals. It supports intervals in seconds, minutes, hours, days, and weeks, as well as daily scheduling at a
10
+ specific time.
11
+
12
+ - **Queue Service**: Scheduled tasks are put in a queue (`QueueService`) for execution. Tasks can be queued with or
13
+ without priority, which determines their order of execution.
14
+
15
+ ## Installing
16
+
17
+ Install and update using pip:
18
+
19
+ ```
20
+ pip install csctracker-queue-scheduler
21
+ ```
22
+
23
+ ## Documentation and Examples
24
+
25
+ COMING SOON
26
+
27
+ ## Simple Example
28
+
29
+ ```python
30
+ from csctracker_queue_scheduler.models.enums.time_unit import TimeUnit
31
+ from csctracker_queue_scheduler.services.queue_service import QueueService
32
+ from csctracker_queue_scheduler.services.scheduler_service import SchedulerService
33
+
34
+
35
+ def my_function(): print("Hello, world!")
36
+
37
+
38
+ scheduler = SchedulerService(queue_service=QueueService(), services=[])
39
+ scheduler.start_scheduled_job(
40
+ function=my_function, period=5, time_unit=TimeUnit.MINUTES)
41
+ ```
42
+
43
+ In the above example, `my_function` would be scheduled to run every 5 minutes.
44
+
45
+ ## Testing
46
+
47
+ Currently, this project does not have automated tests. They may be added in the future as needed.
48
+
49
+ ## Contributing
50
+
51
+ If you would like to contribute to this project, feel free to fork the repository, make your changes, and propose a pull
52
+ request.
53
+
54
+ ## License
55
+
56
+ This project is under the MIT license. Please refer to the `LICENSE` file for more details.
@@ -0,0 +1,25 @@
1
+ class BaseDTO:
2
+ def to_dict(self):
3
+ result = {}
4
+ for key, value in self.__dict__.items():
5
+ if value is None or (isinstance(value, list) and not value): # Ignore None and empty lists
6
+ continue
7
+ if callable(value): # Ignore functions/methods
8
+ continue
9
+ if hasattr(value, 'to_dict'): # If value has to_dict method, call it
10
+ result[key] = value.to_dict()
11
+ elif isinstance(value, list): # If value is a list, call to_dict on its items if possible
12
+ result[key] = [item.to_dict() if hasattr(item, 'to_dict') else item for item in value]
13
+ else: # Otherwise, just assign value
14
+ result[key] = value
15
+ return result
16
+
17
+ def update(self, param):
18
+ if isinstance(param, dict):
19
+ attr_dict = param
20
+ else:
21
+ self.data: list = [param]
22
+ return
23
+
24
+ for key, value in attr_dict.items():
25
+ setattr(self, key, value)
@@ -0,0 +1,10 @@
1
+ from enum import Enum
2
+
3
+
4
+ class TimeUnit(Enum):
5
+ SECONDS = 'seconds'
6
+ MINUTES = 'minutes'
7
+ HOURS = 'hours'
8
+ DAYS = 'days'
9
+ WEEKS = 'weeks'
10
+ DAILY = 'daily'
@@ -0,0 +1,8 @@
1
+ from csctracker_queue_scheduler.models.base_dto import BaseDTO
2
+
3
+
4
+ class GenericDataDTO(BaseDTO):
5
+ msg: str
6
+
7
+ def __init__(self, msg: str = None):
8
+ self.msg = msg
@@ -0,0 +1,3 @@
1
+ from csctracker_queue_scheduler.services.queue_service import QueueService
2
+
3
+ queue_service = QueueService()
@@ -0,0 +1,82 @@
1
+ import logging
2
+ import queue
3
+ import threading
4
+ import time
5
+ from queue import Queue
6
+
7
+ from csctracker_queue_scheduler.models.generic_data_dto import GenericDataDTO
8
+ from csctracker_queue_scheduler.utils import Utils
9
+
10
+
11
+ class QueueService:
12
+ def __init__(self, num_threads: int = 10):
13
+ self.logger = logging.getLogger()
14
+ self.normal_queue = Queue()
15
+ self.priority_queue = Queue()
16
+ self.init_threads(num_threads)
17
+
18
+ def init_threads(self, num_threads):
19
+ for i in range(num_threads):
20
+ self.logger.debug(f"Starting thread {i}/{num_threads}")
21
+ t = threading.Thread(target=self.__worker)
22
+ t.daemon = True
23
+ t.start()
24
+
25
+ def __worker(self):
26
+ while True:
27
+ try:
28
+ self.__run_job(self.priority_queue, "priority")
29
+ except queue.Empty:
30
+ try:
31
+ self.__run_job(self.normal_queue, "normal")
32
+ except queue.Empty:
33
+ time.sleep(5)
34
+ except Exception as e:
35
+ self.logger.error(f"Error in normal queue: {e}")
36
+ except Exception as e:
37
+ self.logger.error(f"Error in priority queue: {e}")
38
+
39
+ def __run_job(self, queue, type):
40
+ func_, args_ = queue.get_nowait()
41
+ if func_ is not None:
42
+ if not args_:
43
+ args_ = None
44
+ self.logger.info(
45
+ f"Executing in {type} queue {Utils.get_friendly_method_name(func_)}({args_ if args_ else ''})")
46
+ if args_ is not None:
47
+ self.logger.info(
48
+ f"Return of {Utils.get_friendly_method_name(func_)}({args_ if args_ else ''}) -> {func_(**args_)}")
49
+ else:
50
+ self.logger.info(
51
+ f"Return of {Utils.get_friendly_method_name(func_)}({args_ if args_ else ''}) -> {func_()}")
52
+ queue.task_done()
53
+ self.logger.info(
54
+ f"Executed in {type} queue {Utils.get_friendly_method_name(func_)}({args_ if args_ else ''})")
55
+
56
+ def clean_queue(self) -> GenericDataDTO:
57
+ while not self.normal_queue.empty():
58
+ try:
59
+ self.normal_queue.get(block=False)
60
+ except queue.Empty:
61
+ continue
62
+ self.normal_queue.task_done()
63
+
64
+ while not self.priority_queue.empty():
65
+ try:
66
+ self.priority_queue.get(block=False)
67
+ except queue.Empty:
68
+ continue
69
+ self.priority_queue.task_done()
70
+
71
+ return GenericDataDTO(msg="Queues clean")
72
+
73
+ def get_queue_size(self) -> list[GenericDataDTO]:
74
+
75
+ return [GenericDataDTO(msg=f"Normal queues: {self.normal_queue.qsize()}"),
76
+ GenericDataDTO(msg=f"Priority queues: {self.priority_queue.qsize()}")]
77
+
78
+ def put(self, func, priority=False, **args):
79
+ if priority:
80
+ self.priority_queue.put((func, args))
81
+ else:
82
+ self.normal_queue.put((func, args))
@@ -0,0 +1,117 @@
1
+ import logging
2
+ import threading
3
+ import time
4
+
5
+ import schedule
6
+
7
+ from csctracker_queue_scheduler.models.enums.time_unit import TimeUnit
8
+ from csctracker_queue_scheduler.models.generic_data_dto import GenericDataDTO
9
+ from csctracker_queue_scheduler.services.queue_service import QueueService
10
+ from csctracker_queue_scheduler.utils.utils import Utils
11
+
12
+
13
+ class SchedulerService:
14
+ def __init__(self, queue_service: QueueService, services: list):
15
+ self.logger = logging.getLogger()
16
+ self.queue_service = queue_service
17
+ self.services = services
18
+ self.services.append(self.queue_service)
19
+ threading.Thread(target=self.worker).start()
20
+
21
+ def worker(self):
22
+ while True:
23
+ try:
24
+ schedule.run_pending()
25
+ time.sleep(1)
26
+ except Exception as e:
27
+ self.logger.error(e)
28
+ pass
29
+ pass
30
+
31
+ def start_scheduled_job(self,
32
+ function,
33
+ args=None,
34
+ period=5,
35
+ time_hh_mm="04:00",
36
+ time_unit: TimeUnit = TimeUnit.MINUTES):
37
+ thread = threading.Thread(target=self.start_scheduler,
38
+ args=(function, args, period, time_hh_mm, time_unit))
39
+ thread.start()
40
+
41
+ def start_scheduler(self, function, args=None, period=5, time_hh_mm=None,
42
+ time_unit: TimeUnit = TimeUnit.MINUTES):
43
+ if args is None:
44
+ args = {}
45
+ if time_unit == TimeUnit.SECONDS:
46
+ schedule.every(period).seconds.do(self.put_in_queue, function, args, True)
47
+ elif time_unit == TimeUnit.MINUTES:
48
+ schedule.every(period).minutes.do(self.put_in_queue, function, args, True)
49
+ elif time_unit == TimeUnit.HOURS:
50
+ schedule.every(period).hours.do(self.put_in_queue, function, args, True)
51
+ elif time_unit == TimeUnit.DAYS:
52
+ schedule.every(period).days.do(self.put_in_queue, function, args, True)
53
+ elif time_unit == TimeUnit.WEEKS:
54
+ schedule.every(period).weeks.do(self.put_in_queue, function, args, True)
55
+ elif time_unit == TimeUnit.DAILY:
56
+ schedule.every().day.at(time_hh_mm).do(self.put_in_queue, function, args, True)
57
+ else:
58
+ raise Exception(f"Inválid time unit -> {time_unit}")
59
+ if time_unit != 'daily':
60
+ self.logger.info(
61
+ f"Job {Utils.get_friendly_method_name(function)}({args if args else ''}) scheduled to run every {period} {time_unit.value}")
62
+ else:
63
+ self.logger.info(
64
+ f"Job {Utils.get_friendly_method_name(function)}({args if args else ''}) scheduled to run at {time_hh_mm}")
65
+
66
+ def init_job(self, function, args=None, priority_job=False, class_name=None, async_job=True) -> GenericDataDTO:
67
+ executed = False
68
+ if args is None:
69
+ args = {}
70
+ if 'priority_job' in args:
71
+ priority_job = args['priority_job'] == 'true'
72
+ del args['priority_job']
73
+ if 'async_job' in args:
74
+ async_job = args['async_job'] == 'true'
75
+ del args['async_job']
76
+ if '.' in function:
77
+ classe, method = function.split('.')
78
+ instance = self.get_instance_by_class_name(classe)
79
+ if instance is not None:
80
+ call_method = SchedulerService.call_method(instance, method)
81
+ if async_job:
82
+ self.queue_service.put(call_method, priority_job, **args)
83
+ else:
84
+ ret_ = call_method(**args)
85
+ return GenericDataDTO(msg=ret_)
86
+ executed = True
87
+ else:
88
+ if class_name is not None:
89
+ instance = self.get_instance_by_class_name(class_name)
90
+ if instance is not None:
91
+ service_call_method = SchedulerService.call_method(instance, function)
92
+ if async_job:
93
+ self.queue_service.put(service_call_method, priority_job, **args)
94
+ else:
95
+ ret_ = service_call_method(**args)
96
+ return GenericDataDTO(msg=ret_)
97
+ executed = True
98
+
99
+ if not executed:
100
+ return GenericDataDTO(msg=f'Job {function} not found')
101
+ schedule_type = 'priority' if priority_job else 'normal'
102
+ return GenericDataDTO(msg=f'Job {function} scheduled for execution {schedule_type}')
103
+
104
+ @staticmethod
105
+ def call_method(instance, method_name):
106
+ method = getattr(instance, method_name)
107
+ return method
108
+
109
+ def put_in_queue(self, function, args=None, priority=False):
110
+ self.queue_service.put(function, priority, **args)
111
+
112
+ def get_instance_by_class_name(self, class_name):
113
+ class_name = Utils.snake_to_camel(class_name)
114
+ for instance in self.services:
115
+ if type(instance).__name__ == class_name:
116
+ return instance
117
+ return None
@@ -0,0 +1,3 @@
1
+ from csctracker_queue_scheduler.utils.utils import Utils
2
+
3
+ utils = Utils()
@@ -0,0 +1,39 @@
1
+ import re
2
+
3
+
4
+ class Utils:
5
+ def __init__(self):
6
+ pass
7
+
8
+ @staticmethod
9
+ def snake_to_camel(word):
10
+ split_word = re.split('_', word)
11
+ return ''.join(x.capitalize() for x in split_word)
12
+
13
+ @staticmethod
14
+ def camel_to_snake(name):
15
+ s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
16
+ return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
17
+
18
+ @staticmethod
19
+ def to_snake_case(str_, scream):
20
+ if str_ is None:
21
+ return None
22
+ str_ = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', str_)
23
+ str_ = re.sub('([a-z0-9])([A-Z])', r'\1_\2', str_).lower()
24
+ str_ = str_.replace(" ", "_")
25
+ if scream:
26
+ str_ = str_.upper()
27
+ return str_
28
+
29
+ @staticmethod
30
+ def get_friendly_method_name(method_name):
31
+ try:
32
+ try:
33
+ function_class = method_name.__self__.__class__.__name__
34
+ except:
35
+ function_class = method_name.__class__.__name__
36
+ function_name = method_name.__name__
37
+ return f"{function_class}.{function_name}"
38
+ except:
39
+ return method_name
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.1
2
+ Name: csctracker-queue-scheduler
3
+ Version: 24.1.1
4
+ Summary: A library for handle scheduled jobs.
5
+ Home-page: https://github.com/krlsedu/CscTrackerQueueScheduler.git
6
+ Author: Carlos Eduardo
7
+ License: MIT
8
+ Description: # CscTrackerQueueScheduler
9
+
10
+ This project is a Python job scheduling and queuing library. It allows jobs to be scheduled to run at specific periods
11
+ and queues these jobs for execution.
12
+
13
+ ## Key Features
14
+
15
+ - **Job Scheduling**: The Scheduler service (`SchedulerService`) allows jobs to be scheduled for execution at specified
16
+ intervals. It supports intervals in seconds, minutes, hours, days, and weeks, as well as daily scheduling at a
17
+ specific time.
18
+
19
+ - **Queue Service**: Scheduled tasks are put in a queue (`QueueService`) for execution. Tasks can be queued with or
20
+ without priority, which determines their order of execution.
21
+
22
+ ## Installing
23
+
24
+ Install and update using pip:
25
+
26
+ ```
27
+ pip install csctracker-queue-scheduler
28
+ ```
29
+
30
+ ## Documentation and Examples
31
+
32
+ COMING SOON
33
+
34
+ ## Simple Example
35
+
36
+ ```python
37
+ from csctracker_queue_scheduler.models.enums.time_unit import TimeUnit
38
+ from csctracker_queue_scheduler.services.queue_service import QueueService
39
+ from csctracker_queue_scheduler.services.scheduler_service import SchedulerService
40
+
41
+
42
+ def my_function(): print("Hello, world!")
43
+
44
+
45
+ scheduler = SchedulerService(queue_service=QueueService(), services=[])
46
+ scheduler.start_scheduled_job(
47
+ function=my_function, period=5, time_unit=TimeUnit.MINUTES)
48
+ ```
49
+
50
+ In the above example, `my_function` would be scheduled to run every 5 minutes.
51
+
52
+ ## Testing
53
+
54
+ Currently, this project does not have automated tests. They may be added in the future as needed.
55
+
56
+ ## Contributing
57
+
58
+ If you would like to contribute to this project, feel free to fork the repository, make your changes, and propose a pull
59
+ request.
60
+
61
+ ## License
62
+
63
+ This project is under the MIT license. Please refer to the `LICENSE` file for more details.
64
+ Keywords: queue,scheduled,scheduler
65
+ Platform: UNKNOWN
66
+ Classifier: Intended Audience :: Developers
67
+ Classifier: Programming Language :: Python :: 3
68
+ Classifier: Programming Language :: Python :: 3.9
69
+ Classifier: Topic :: Software Development
70
+ Requires-Python: >=3
71
+ Description-Content-Type: text/markdown
@@ -0,0 +1,20 @@
1
+ LICENSE
2
+ README.md
3
+ setup.cfg
4
+ setup.py
5
+ csctracker_queue_scheduler/__init__.py
6
+ csctracker_queue_scheduler.egg-info/PKG-INFO
7
+ csctracker_queue_scheduler.egg-info/SOURCES.txt
8
+ csctracker_queue_scheduler.egg-info/dependency_links.txt
9
+ csctracker_queue_scheduler.egg-info/requires.txt
10
+ csctracker_queue_scheduler.egg-info/top_level.txt
11
+ csctracker_queue_scheduler/models/__init__.py
12
+ csctracker_queue_scheduler/models/base_dto.py
13
+ csctracker_queue_scheduler/models/generic_data_dto.py
14
+ csctracker_queue_scheduler/models/enums/__init__.py
15
+ csctracker_queue_scheduler/models/enums/time_unit.py
16
+ csctracker_queue_scheduler/services/__init__.py
17
+ csctracker_queue_scheduler/services/queue_service.py
18
+ csctracker_queue_scheduler/services/scheduler_service.py
19
+ csctracker_queue_scheduler/utils/__init__.py
20
+ csctracker_queue_scheduler/utils/utils.py
@@ -0,0 +1,2 @@
1
+ pytz~=2023.3.post1
2
+ schedule~=1.2.1
@@ -0,0 +1,7 @@
1
+ [metadata]
2
+ description-file = README.md
3
+
4
+ [egg_info]
5
+ tag_build =
6
+ tag_date = 0
7
+
@@ -0,0 +1,32 @@
1
+ import setuptools
2
+ from version import get_version
3
+
4
+ VERSION = get_version()
5
+
6
+ with open("README.md", "r") as fh:
7
+ long_description = fh.read()
8
+
9
+ with open('requirements.txt') as f:
10
+ required = f.read().splitlines()
11
+
12
+ setuptools.setup(
13
+ name="csctracker-queue-scheduler",
14
+ version=VERSION,
15
+ license="MIT",
16
+ author="Carlos Eduardo",
17
+ description="A library for handle scheduled jobs.",
18
+ long_description=long_description,
19
+ long_description_content_type="text/markdown",
20
+ url="https://github.com/krlsedu/CscTrackerQueueScheduler.git",
21
+ packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
22
+ keywords=['queue', 'scheduled', 'scheduler'],
23
+ classifiers=[
24
+ "Intended Audience :: Developers",
25
+ 'Programming Language :: Python :: 3',
26
+ 'Programming Language :: Python :: 3.9',
27
+ "Topic :: Software Development",
28
+ ],
29
+ install_requires=required,
30
+ python_requires='>=3',
31
+ include_package_data=True,
32
+ )