{"id":20839852,"url":"https://github.com/pranavarora1895/intermediate_python","last_synced_at":"2026-04-24T10:34:03.776Z","repository":{"id":126789802,"uuid":"393879117","full_name":"pranavarora1895/intermediate_python","owner":"pranavarora1895","description":"This project demonstrates threads, locks, semaphores, events, daemon threads, queues, socket programming, database programming and logging.","archived":false,"fork":false,"pushed_at":"2021-08-08T12:25:03.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T21:31:28.244Z","etag":null,"topics":["daemon-thread","database","locks","logging","queues","semaphores","socket","threads"],"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/pranavarora1895.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":"2021-08-08T06:31:44.000Z","updated_at":"2021-08-08T12:28:29.000Z","dependencies_parsed_at":"2023-06-18T02:00:14.115Z","dependency_job_id":null,"html_url":"https://github.com/pranavarora1895/intermediate_python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pranavarora1895/intermediate_python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranavarora1895%2Fintermediate_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranavarora1895%2Fintermediate_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranavarora1895%2Fintermediate_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranavarora1895%2Fintermediate_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pranavarora1895","download_url":"https://codeload.github.com/pranavarora1895/intermediate_python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pranavarora1895%2Fintermediate_python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32219185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T10:26:35.452Z","status":"ssl_error","status_checked_at":"2026-04-24T10:25:27.643Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["daemon-thread","database","locks","logging","queues","semaphores","socket","threads"],"created_at":"2024-11-18T01:14:35.271Z","updated_at":"2026-04-24T10:34:03.771Z","avatar_url":"https://github.com/pranavarora1895.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intermediate \u003cimg src=\"https://img.shields.io/badge/Python-FFD43B?style=for-the-badge\u0026logo=python\u0026logoColor=darkgreen\"/\u003e Topics\n\nThis repository demonstrates: \n* Threads\n* Locks\n* Semaphores\n* Events\n* Daemon Threads\n* Queues\n* Socket Programming\n* Database Programming\n* Logging\n\n---\n\n\u003e # Multi-threading\n\nThreads are used to execute processes simultaneously. It results in using up lesser execution time, efficient use of memory and good communication between the processes make the application to respond faster.\n\n* View this [code](https://github.com/pranavarora1895/python_threads/blob/master/main.py) to see how threading in Python works.\n\n\u003e # Thread Synchronization\n\nThreads make processes work simultaneously, but the problems arise when multiple threads are trying to access the same element, which could lead to run-time errors. To overcome this problem, we can use lock or semaphores.\n\n\u003e ### Lock\n\nLock is used to lock one process until it finishes, and when it gets released down, it allows other process to execute. It prevents the conflict of accessing the same element, thus eliminating run-time error.\n\n* View this [code](https://github.com/pranavarora1895/python_threads/blob/master/ThreadSync.py) to see how lock works.\n\n\u003e ### Semaphores\n\nSemaphores are used when we have to lock the process partially. Suppose, in the given [code](https://github.com/pranavarora1895/python_threads/blob/master/semaphores.py) the process locks for 5 seconds and then it is released.\n\n\u003e # Events\n\nWhen the events are triggered, they process the related tasks or functions.\n\n* View this [code](https://github.com/pranavarora1895/python_threads/blob/master/events.py) to see how event works.\n\n\u003e # Daemon Threads\n\nDaemon Threads are those threads which run even when the whole script is finished executing. These threads are used to perform some task continously like reading a file continously as shown in the [code](https://github.com/pranavarora1895/python_threads/blob/master/daemon_threads.py), where a daemon thread reads the file and other thread prints the text from that file for 30 seconds and finishes executing, but that daemon thread never stops.\n\n\u003e # Queues\n\nQueues are the data structures based on First-In-First-Out (FIFO) concept. Queues are very important while dealing with threads. An example is shown in the [code](https://github.com/pranavarora1895/python_threads/blob/master/queues.py) where the elements of the list are put into the queue and as the multiple threads finish processing the elements, the queue eliminates them.\n\n\u003e # Socket Programming\n\nSocket Programming is used to connect to a server in real-time. The server binds the IP-Address and Port Number and the client listens to that IP Address and Port to establish the connection between the two. Socket programming works on OSI Layer 3 (Network Layer) and Layer 4 (Transport Layer). In Layer 4, we have the option of using either TCP or UDP Models.\n\n* View Server Code [Here](https://github.com/pranavarora1895/python_threads/blob/master/sockets.py)\n* View Client Code [Here](https://github.com/pranavarora1895/python_threads/blob/master/socket_client.py)\n\n\u003e # Database Programming\n\nPython can connect to SQL and NoSQL databases efficiently and using Python's Object Oriented Programming Concepts, we can perform CRUD (Create, Read, Update \u0026 Delete) operations in the database.\n\n* View this [code](https://github.com/pranavarora1895/python_threads/blob/master/databases.py) to understand how database along with python work. This project used SQLite Database.\n\n\u003e # Logging\n\nLogging is a useful tool to manage any application. It is mostly used by the services teams because they use logs that give useful insights to your running application. Logging have 5 levels.\n\n* DEBUG\n* INFO\n* WARNING\n* ERROR\n* CRITICAL\n\nDefault Setting in the logging level is CRITICAL. So when we perform logging operation, it only displays CRITICAL information on the console. However, the logging levels can be changed. You can set the formatter where you want to store the log, or you can create your own log.\n\n* View this [code](https://github.com/pranavarora1895/python_threads/blob/master/loggers.py) to get the better insights in logging.\n\n---\n\n* Follow Me On Instagram at [Pranav Arora](https://www.instagram.com/arorapranav187)\n* Lets Get Connected on Linkedin at [Pranav Arora](https://www.linkedin.com/in/pranav-arora-354b71bb/)\n\n\n### ThankYou!\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpranavarora1895%2Fintermediate_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpranavarora1895%2Fintermediate_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpranavarora1895%2Fintermediate_python/lists"}