{"id":21569624,"url":"https://github.com/mohamed00abdelmonem/python_topics_advanced","last_synced_at":"2025-03-18T05:45:38.085Z","repository":{"id":246318965,"uuid":"820734473","full_name":"Mohamed00Abdelmonem/Python_Topics_Advanced","owner":"Mohamed00Abdelmonem","description":"The Python Topics Advanced repository is designed to help Python developers enhance their skills by covering advanced topics and providing practical examples. This repository is particularly useful for those preparing for technical interviews or seeking to deepen their understanding of complex Python concepts.","archived":false,"fork":false,"pushed_at":"2025-02-09T09:20:26.000Z","size":652,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T09:28:44.379Z","etag":null,"topics":["context-manager","data-classes","decorators-python","logging","python","q-interviews","typer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mohamed00Abdelmonem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-27T04:40:46.000Z","updated_at":"2025-02-09T09:20:29.000Z","dependencies_parsed_at":"2025-01-24T12:28:47.180Z","dependency_job_id":null,"html_url":"https://github.com/Mohamed00Abdelmonem/Python_Topics_Advanced","commit_stats":null,"previous_names":["mohamed00abdelmonem/python_topics_advanced"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamed00Abdelmonem%2FPython_Topics_Advanced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamed00Abdelmonem%2FPython_Topics_Advanced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamed00Abdelmonem%2FPython_Topics_Advanced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohamed00Abdelmonem%2FPython_Topics_Advanced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mohamed00Abdelmonem","download_url":"https://codeload.github.com/Mohamed00Abdelmonem/Python_Topics_Advanced/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166677,"owners_count":20409178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["context-manager","data-classes","decorators-python","logging","python","q-interviews","typer"],"created_at":"2024-11-24T11:10:03.992Z","updated_at":"2025-03-18T05:45:38.063Z","avatar_url":"https://github.com/Mohamed00Abdelmonem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Python Topics Advanced\n\nWelcome to the **Python Topics Advanced** repository! This repository contains advanced Python topics with explanations, examples, and interview questions to help you deepen your knowledge and prepare for technical interviews.\n\n## Repository Contents\n\n- [Context Manager](#context-manager)\n- [Data Classes](#data-classes)\n- [Decorator](#decorator)\n- [Logging](#logging)\n- [Typer](#typer)\n- and others....\n- [Interview Questions](#interview-questions)\n\n## Context Manager\n\nContext managers are a way to allocate and release resources precisely when you want to. The most widely used example of context managers is the `with` statement.\n\n**Example:**\n\n```python\nwith open('file.txt', 'w') as file:\n    file.write('Hello, World!')\n```\n\n## Data Classes\n\nData classes provide a decorator and functions for automatically adding generated special methods such as `__init__()` and `__repr__()` to user-defined classes.\n\n**Example:**\n\n```python\nfrom dataclasses import dataclass\n\n@dataclass\nclass Point:\n    x: int\n    y: int\n\np = Point(1, 2)\nprint(p)  # Point(x=1, y=2)\n```\n\n## Decorator\n\nDecorators are a design pattern in Python that allows a user to add new functionality to an existing object without modifying its structure. They are usually called before the definition of a function you want to decorate.\n\n**Example:**\n\n```python\ndef my_decorator(func):\n    def wrapper():\n        print(\"Something is happening before the function is called.\")\n        func()\n        print(\"Something is happening after the function is called.\")\n    return wrapper\n\n@my_decorator\ndef say_hello():\n    print(\"Hello!\")\n\nsay_hello()\n```\n\n## Logging\n\nLogging is a means of tracking events that happen when some software runs. The logging module in Python is a standard module that provides a flexible framework for emitting log messages from Python programs.\n\n**Example:**\n\n```python\nimport logging\n\nlogging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')\n\nlogging.debug('This is a debug message')\nlogging.info('This is an info message')\nlogging.warning('This is a warning message')\nlogging.error('This is an error message')\nlogging.critical('This is a critical message')\n```\n\n## Typer\n\nTyper is a library for building command-line interface (CLI) applications that users will love using and developers will love creating. Based on Python's type hints.\n\n**Example:**\n\n```python\nimport typer\n\ndef main(name: str):\n    typer.echo(f\"Hello {name}\")\n\nif __name__ == \"__main__\":\n    typer.run(main)\n```\n\n## Interview Questions\n\nThis section includes questions that can be asked in interviews related to the topics covered in this repository. Each section has its own set of questions aimed at testing your understanding of the topic.\n\n---\n\n### Contact\n\nFor any questions or inquiries, please contact [Mohamed00Abdelmonem](https://github.com/Mohamed00Abdelmonem).\n\n---\n\nThank you for visiting the **Python Topics Advanced** repository! Happy coding!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed00abdelmonem%2Fpython_topics_advanced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamed00abdelmonem%2Fpython_topics_advanced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed00abdelmonem%2Fpython_topics_advanced/lists"}