pdeprecator


Namepdeprecator JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/Agent-Hellboy/pdeprecator
SummaryA library provides a decorator deprecated_params that allows you to deprecate certain parameters in your class methods or function.
upload_time2024-03-06 09:36:53
maintainer
docs_urlNone
authorPrince Roshan
requires_python>=3.8
licenseMIT
keywords deprecator param-deprecator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            deprecated_params
=================

-  This library provides a decorator deprecated_params that allows you
   to deprecate certain parameters in your class methods or function.

Installation
------------

For stable version 
   - pip install pdeprector

For developement 
   - git clone https://github.com/Agent-Hellboy/pdeprector
   - cd pdeprector 
   - python -m venv .venv 
   - source .venv/bin/activate

Example
-------

.. code:: python

   # Example usage
   class MyClass:
       @deprecated_params({"old_param": "new_param"})
       def __init__(self, new_param):
           self.new_param = new_param


   # Usage
   obj = MyClass(old_param="value")
   print(obj.new_param)

Warning
-------

::

   - It's recommended to write new functions or classes with a v2 suffix instead of using this deprecated library. 

   - If possible, migrate to the newer version with v2 suffix.    
     
     However, if migration is not feasible at the moment, you can continue using this library with caution.

   You should do following 

.. code:: python

     pip install deprecated

     from deprecated import deprecated

     # Deprecate a function
     @deprecated(reason="Use another_function instead")
     def deprecated_function():
         pass

     # Deprecate a class method
     class MyClass:
         @deprecated(reason="Use another_method instead")
         def deprecated_method(self):
             pass

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Agent-Hellboy/pdeprecator",
    "name": "pdeprecator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "deprecator,param-deprecator",
    "author": "Prince Roshan",
    "author_email": "princekrroshan01@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/35/8d/d1be21a8fe9b731739b13e6f02a283610887c4ead92476c104699e75e957/pdeprecator-0.0.1.tar.gz",
    "platform": null,
    "description": "deprecated_params\n=================\n\n-  This library provides a decorator deprecated_params that allows you\n   to deprecate certain parameters in your class methods or function.\n\nInstallation\n------------\n\nFor stable version \n   - pip install pdeprector\n\nFor developement \n   - git clone https://github.com/Agent-Hellboy/pdeprector\n   - cd pdeprector \n   - python -m venv .venv \n   - source .venv/bin/activate\n\nExample\n-------\n\n.. code:: python\n\n   # Example usage\n   class MyClass:\n       @deprecated_params({\"old_param\": \"new_param\"})\n       def __init__(self, new_param):\n           self.new_param = new_param\n\n\n   # Usage\n   obj = MyClass(old_param=\"value\")\n   print(obj.new_param)\n\nWarning\n-------\n\n::\n\n   - It's recommended to write new functions or classes with a v2 suffix instead of using this deprecated library. \n\n   - If possible, migrate to the newer version with v2 suffix.    \n     \n     However, if migration is not feasible at the moment, you can continue using this library with caution.\n\n   You should do following \n\n.. code:: python\n\n     pip install deprecated\n\n     from deprecated import deprecated\n\n     # Deprecate a function\n     @deprecated(reason=\"Use another_function instead\")\n     def deprecated_function():\n         pass\n\n     # Deprecate a class method\n     class MyClass:\n         @deprecated(reason=\"Use another_method instead\")\n         def deprecated_method(self):\n             pass\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A library provides a decorator deprecated_params that allows you to deprecate certain parameters in your class methods or function.",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Agent-Hellboy/pdeprecator"
    },
    "split_keywords": [
        "deprecator",
        "param-deprecator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "065216005bcb47246810f501a290aa9bb882a1bc571f8faf271da34cdfd06fc6",
                "md5": "8467b3ac28e69dea3ef280d4bef56b9b",
                "sha256": "60a34163f2d308bd68f667245f56b20a9d8ed921dfb0ead65b1197a2717ee008"
            },
            "downloads": -1,
            "filename": "pdeprecator-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8467b3ac28e69dea3ef280d4bef56b9b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3629,
            "upload_time": "2024-03-06T09:36:50",
            "upload_time_iso_8601": "2024-03-06T09:36:50.429844Z",
            "url": "https://files.pythonhosted.org/packages/06/52/16005bcb47246810f501a290aa9bb882a1bc571f8faf271da34cdfd06fc6/pdeprecator-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "358dd1be21a8fe9b731739b13e6f02a283610887c4ead92476c104699e75e957",
                "md5": "5c1ab53c2d9c1a2b881b8ccaa9ec95fb",
                "sha256": "6ac2f99f541b2f0c53df9a5886f5fa1a157043ec29db1b8425d80fc9924115bb"
            },
            "downloads": -1,
            "filename": "pdeprecator-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5c1ab53c2d9c1a2b881b8ccaa9ec95fb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3165,
            "upload_time": "2024-03-06T09:36:53",
            "upload_time_iso_8601": "2024-03-06T09:36:53.027506Z",
            "url": "https://files.pythonhosted.org/packages/35/8d/d1be21a8fe9b731739b13e6f02a283610887c4ead92476c104699e75e957/pdeprecator-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-06 09:36:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Agent-Hellboy",
    "github_project": "pdeprecator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pdeprecator"
}
        
Elapsed time: 4.45488s