Skip to content

Commit 63b738f

Browse files
Merge pull request #1 from aligheshlaghi97/gh-pages-dev
Gh pages dev
2 parents 20f2e69 + 7ed01d0 commit 63b738f

File tree

47 files changed

+257
-386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+257
-386
lines changed
Binary file not shown.
Binary file not shown.

README.md

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,56 +11,10 @@ This repository serves as a comprehensive resource for learning about asynchrono
1111
**Python latest versions Coverage:** Discover the newest capabilities of Python 3.12 and how they enhance async programming in Python.<br />
1212
**Interactive Learning:** Experiment with the provided code examples and gain hands-on experience with async Python in action.<br />
1313
**Community Engagement:** Join a growing community of developers interested in async Python, contribute your own examples, and collaborate with others to explore async programming further.<br />
14-
## Table of Contents:
1514

16-
1. * **Introduction to Asynchronous Programming**
17-
- What is asynchronous programming?
18-
- Thread vs process, Concurrency vs parallelism, GIL
19-
- Event loops and coroutines
15+
## Documentation
16+
For full documentation, including tutorials and examples, visit the
17+
[official documentation](https://aligheshlaghi97.github.io/asynchronous-python/).
2018

21-
2. * **Getting Started with asyncio**
22-
- Overview of the asyncio module in Python
23-
- Runners
24-
- Awaiting coroutines, creating tasks and using event loop
25-
- Other important APIs of asyncio
26-
27-
3. * **Handling CPU and I/O Bound Tasks**
28-
- CPU-bound vs I/O-bound
29-
- Performing asynchronous I/O operations with asyncio and httpx
30-
- Performing asynchronous CPU operations
31-
- Strategies for balancing CPU and I/O-bound workloads in async Python applications
32-
33-
4. * **Synchronization and Coordination**
34-
- Managing shared resources and avoiding race conditions
35-
- Synchronization primitives: locks, semaphores, and barriers
36-
- Coordinating asynchronous tasks with asyncio's synchronization tools
37-
38-
5. * **Advanced Techniques**
39-
- Error handling and exception propagation in async Python
40-
- Chaining coroutines using callback and event to compose more complex async workflows
41-
- asyncio Queue and consumer-producer workflows
42-
- asyncio Future
43-
44-
6. * **Exploring Python 3.12 Features**
45-
- Overview of new features and enhancements in Python 3.12
46-
- Highlighting async-related improvements and additions in Python 3.11 and 3.12
47-
- Practical examples demonstrating the use of newer Python versions features in async programming
48-
49-
7. * **Web Applications**
50-
- ASGI vs. WSGI: Understanding the differences and benefits
51-
- Building RESTful APIs with async Python: Introduction to Starlette microframework
52-
53-
## How to Get Started:
54-
55-
1. Explore the directories and examples in the repository to learn about different async Python concepts. <br />
56-
2. Read the documentation accompanying each example to understand the underlying principles and techniques. <br />
57-
3. Experiment with the code, modify it, and see how different changes affect the behavior of async programs. <br />
58-
4. Engage with the async Python community by sharing your insights, contributing new examples, or providing feedback on existing content. <br />
59-
60-
## How to Contribute:
61-
62-
1. Fork the repository and create a new branch for your contributions. <br />
63-
2. Add your code examples, tutorials, or documentation improvements. <br />
64-
3. Ensure your contributions adhere to the repository's coding standards and documentation format. <br />
65-
4. Submit a pull request detailing the changes you've made and explaining their purpose. <br />
66-
5. I will review your pull request, provide feedback if necessary, and merge it once approved. <br />
19+
## Contribute:
20+
Contributions are very welcome! Please check our [Contributing Guidelines](/CONTRIBUTING.md) to get started.

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
remote_theme: pages-themes/[email protected]
2+
plugins:
3+
- jekyll-remote-theme # add this line to the plugins list if you already have one

_includes/sidebar.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="sidebar">
2+
<h2>Navigation</h2>
3+
<ul>
4+
<li><a href="{{ '/' | relative_url }}">Home</a></li>
5+
<li><a href="{{ '/chapter1/' | relative_url }}">Chapter 1: Introduction to Asynchronous Programming</a></li>
6+
<li><a href="{{ '/chapter2/' | relative_url }}">Chapter 2: Getting Started with asyncio</a></li>
7+
<li><a href="{{ '/chapter3/' | relative_url }}">Chapter 3: Handling CPU and I/O Bound Tasks</a></li>
8+
<li><a href="{{ '/chapter4/' | relative_url }}">Chapter 4: Synchronization and Coordination</a></li>
9+
<li><a href="{{ '/chapter5/' | relative_url }}">Chapter 5: Advanced Techniques</a></li>
10+
<li><a href="{{ '/chapter6/' | relative_url }}">Chapter 6: Exploring Python 3.12 Features</a></li>
11+
<li><a href="{{ '/chapter7/' | relative_url }}">Chapter 7: Web Applications</a></li>
12+
</ul>
13+
</div>

_layouts/default.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>{{ page.title }}</title>
7+
8+
{% seo %}
9+
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
10+
<!--[if lt IE 9]>
11+
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
12+
<![endif]-->
13+
{% include head-custom.html %}
14+
15+
</head>
16+
<body>
17+
<div class="wrapper">
18+
<header>
19+
<h1>{{ site.title }}</h1>
20+
<p>{{ site.description }}</p>
21+
<!-- <button id="theme-toggle">Toggle Dark Mode</button>-->
22+
<p class="sidebar">{% include sidebar.html %}</p>
23+
</header>
24+
25+
<section>
26+
27+
{{ content }}
28+
29+
</section>
30+
31+
<footer>
32+
<p>&copy; {{ site.time | date: '%Y' }} | <a href="https://github.com/aligheshlaghi97/asynchronous-python"
33+
target="_blank">View on GitHub</a></p>
34+
<p>
35+
<a href="https://github.com/aligheshlaghi97/asynchronous-python/stargazers">
36+
<img alt="GitHub stars" src="https://img.shields.io/github/stars/aligheshlaghi97/asynchronous-python?style=social">
37+
</a>
38+
<a href="https://github.com/aligheshlaghi97/asynchronous-python/network/members">
39+
<img alt="GitHub forks" src="https://img.shields.io/github/forks/aligheshlaghi97/asynchronous-python?style=social">
40+
</a>
41+
</p>
42+
</footer>
43+
</div>
44+
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
45+
<!-- <script src="{{ "/assets/js/theme.js" | relative_url }}"></script>-->
46+
</body>
47+
</html>
48+

assets/css/style.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
@import "jekyll-theme-minimal";

assets/js/scale.fix.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
(function(document) {
2+
var metas = document.getElementsByTagName('meta'),
3+
changeViewportContent = function(content) {
4+
for (var i = 0; i < metas.length; i++) {
5+
if (metas[i].name == "viewport") {
6+
metas[i].content = content;
7+
}
8+
}
9+
},
10+
initialize = function() {
11+
changeViewportContent("width=device-width, minimum-scale=1.0, maximum-scale=1.0");
12+
},
13+
gestureStart = function() {
14+
changeViewportContent("width=device-width, minimum-scale=0.25, maximum-scale=1.6");
15+
},
16+
gestureEnd = function() {
17+
initialize();
18+
};
19+
20+
21+
if (navigator.userAgent.match(/iPhone/i)) {
22+
initialize();
23+
24+
document.addEventListener("touchstart", gestureStart, false);
25+
document.addEventListener("touchend", gestureEnd, false);
26+
}
27+
})(document);

assets/js/theme.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
document.getElementById('theme-toggle').addEventListener('click', function() {
2+
document.body.classList.toggle('dark-mode');
3+
});

1. Introduction to Asynchronous Programming/README.md renamed to docs/1. Introduction to Asynchronous Programming/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
layout: default
3+
title: "Chapter 1: Introduction to Asynchronous Programming"
4+
permalink: /chapter1/
5+
---
6+
17
# Introduction to Asynchronous Programming
28
## What is asynchronous programming?
39
Starting with a broad question, aren't we? Well, when it comes to asynchronous programming, the goal is to execute multiple tasks within our code simultaneously.
@@ -33,7 +39,7 @@ Coroutines have been described as ["functions whose execution you can pause"](ht
3339
This seems confusing, but wait, we will clarify it.
3440
Anything in Python that can be implemented with the ```async def``` statement is a coroutine. <br>
3541
Here ```func``` is a coroutine:
36-
```python3
42+
```python
3743
async def func():
3844
pass
3945
```

0 commit comments

Comments
 (0)