Created
May 22, 2024 07:47
-
-
Save 2tony2/ee3c34c326f02b58e50d6e263bf9dbee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import inspect | |
| # Get the class definition of the object | |
| print(inspect.getmembers(pipeline)) | |
| # Output: [('__class__', <class '__main__.DataPipeline'>), ('__delattr__', <method-wrapper '__delattr__' of DataPipeline object at 0x7f8b6f3b1f10>), ('__dict__', {'name': 'ETL Pipeline', 'batch_size': 500, 'status': 'inactive'}), ('__dir__', <built-in method __dir__ of DataPipeline object at 0x7f8b6f3b1f10>), ...] | |
| # Get the signature of the __init__ method | |
| print(inspect.signature(DataPipeline.__init__)) | |
| # Output: (self, name: str, batch_size: int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment