You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_build/html/_sources/newsletters/2023/WEEK_25.rst.txt
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -334,7 +334,7 @@ you can use a ``requests.Session`` object. Here’s an example:
334
334
335
335
# Also U can set custom attibute to response object
336
336
response.custom_hook_called=True
337
-
337
+
338
338
339
339
# Create a session and register the custom hook
340
340
session = requests.Session()
@@ -386,7 +386,7 @@ understand how it works.
386
386
'text': link.text
387
387
}
388
388
389
-
389
+
390
390
391
391
# Create a CrawlerProcess instance
392
392
process = CrawlerProcess()
@@ -420,7 +420,7 @@ differently or store them in any desired format.
420
420
parameters to customize link extraction based on patterns, tags,
421
421
attributes, and more. Make sure to explore the Scrapy documentation for
422
422
more advanced usage.
423
-
423
+
424
424
7. 📝 itemgetter in python
425
425
***************************
426
426
@@ -614,22 +614,22 @@ dependencies into a single executable ZIP file. This ZIP file can be
614
614
executed directly, making it convenient to distribute your application
615
615
as a standalone package.
616
616
617
-
🚀 **Key Features and Benefits:**
617
+
🚀 **Key Features and Benefits:**
618
618
619
-
- Simplified Distribution:
619
+
- Simplified Distribution:
620
620
With Zipapp, you can distribute your Python application as a single file,
621
-
eliminating the need for users to install dependencies separately.
621
+
eliminating the need for users to install dependencies separately.
622
622
623
-
- Easy Execution:
623
+
- Easy Execution:
624
624
The executable ZIP file can be run directly without
625
-
the need for a Python interpreter or additional setup.
625
+
the need for a Python interpreter or additional setup.
626
626
627
-
- Cross-Platform Compatibility:
627
+
- Cross-Platform Compatibility:
628
628
Zipapp packages are portable and can
629
629
be executed on different operating systems, making it easier to
630
630
distribute your application across platforms.
631
631
632
-
🔧 **Creating a Zipapp:**
632
+
🔧 **Creating a Zipapp:**
633
633
634
634
Creating a zipapp is straightforward.Here’s a
635
635
simple example create ``app.py`` file in ``myapp``:
@@ -652,7 +652,7 @@ To create the zipapp
652
652
In this example, we’re creating a zipapp named ``myapp.pyz``, specifying
653
653
the ``app.py`` file as the entry point .
654
654
655
-
🚀 **Executing the Zipapp:**
655
+
🚀 **Executing the Zipapp:**
656
656
657
657
Once you have the zipapp file, you can run
658
658
it like any other executable. Here’s an example:
@@ -662,16 +662,16 @@ it like any other executable. Here’s an example:
662
662
$ python myapp.pyz
663
663
Hello, Python-World!
664
664
665
-
💡 **Use Cases and Considerations:**
665
+
💡 **Use Cases and Considerations:**
666
666
667
-
- *Distribution of Command-Line Tools:*
667
+
- *Distribution of Command-Line Tools:*
668
668
Zipapp is an excellent choice for packaging and distributing
669
-
command-line tools written in Python.
670
-
- *Portable Applications:*
669
+
command-line tools written in Python.
670
+
- *Portable Applications:*
671
671
If you want to create a portable Python application that can be run on
672
672
different systems without requiring installation, zipapp can be a great
673
-
solution.
674
-
- *Version Management:*
673
+
solution.
674
+
- *Version Management:*
675
675
Zipapp can help in managing and
676
676
distributing specific versions of your application, ensuring consistent
677
677
execution across environments.
@@ -687,7 +687,7 @@ processes.
687
687
688
688
🔎 When it comes to handling sensitive user input, such as passwords or other confidential information, security is of utmost importance.the `getpass()` method, which provides a secure way to accept user input without displaying it on the screen.
689
689
690
-
**What is getpass()?**
690
+
**What is getpass()?**
691
691
692
692
The `getpass()` method is a part of the Python `getpass` module. It is used to prompt the user for input, such as a password, and securely captures the input without echoing it back to the screen.
693
693
@@ -704,7 +704,7 @@ Using the `getpass()` method is straightforward. Here's a simple example:
704
704
.. code:: python
705
705
706
706
import getpass
707
-
707
+
708
708
password = getpass.getpass("Enter your password: ")
709
709
print("Password entered:", password)
710
710
@@ -719,7 +719,7 @@ When you run this code, the `getpass()` method will prompt the user to enter a p
719
719
The `getpass()` method is a valuable tool for securely capturing sensitive user input, making it an ideal choice when handling passwords or other confidential information. By using this method, you can enhance the security of your applications and protect user privacy.
0 commit comments