Metadata-Version: 2.1
Name: apico
Version: 1.0.1
Summary: Tool for monitoring changes in RESTful APIs quickly and easily
Home-page: https://github.com/itsmewulf/apico
Author: itsmewulf
Author-email: wulf.developer@gmail.com
License: UNKNOWN
Description: # apico
        *The easy way to monitor changes in RESTful APIs.*
        
        ## Installation
        ```
        $ pip install apico
        ```
        ## Example usage 
        ```py
        from apico import Monitor, Response
        
        
        monitor = Monitor(url='https://api.github.com/users/itsmewulf', rate=10.0, headers={'Authorization': 'GITHUB_TOKEN'})
        
        @monitor.listener()
        def on_change(old, new):
            print('Something changed!')
            
        @monitor.listener('no_change')
        def nothing_changed():
            print('Nothing changed!')
            
        @monitor.listener()
        def on_request():
            print('This is called before every request.')
        ```
        
        ## Some reference
        ### Events
        The events supported by the `Monitor.listener` decorator are:
        - `change`
        - `request`
        - `no_change`  
        
        As you can see in the example, listeners can be registered by passing the event name straight to the decorator (`monitor.listener('change')`) or inferred from the function name starting with `on_`:
        ```py
        @monitor.listener()
        def on_change(...):
        ```
        
        ### Returns
        The responses returned by apico are actually instances of [`requests.Response`](https://pypi.org/project/requests/)
        
        ### Rate
        The rate at which the Monitor sends requests is controlled via the `rate` parameter, which is either an integer, or a float - `33` is a request every 33 seconds, `0.5` is 2 requests every second.
        _________________
        ## Reporting Issues
        If you find any error/bug/mistake with the package or in the code feel free to create an issue and report
        it [here.](https://github.com/itsmewulf/apico/issues)
        
        ## Fix/Edit Content
        If you wish to contribute to this package, fork the repository, make your changes and then simply create a Pull Request!
        
Keywords: api-wrapper,http,request,api,monitor
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
