This video shows an introduction to "LangCorn" which is an API server that enables you to serve LangChain models and pipelines with ease, leveraging the power of FastAPI for a robust and efficient experience.
I show how to test via Python with requests, and from the Swagger UI. I also demonstrate how to pass in input parameters.
- chapters - 00:00 intro 01:54 python test script 04:45 the input variable 07:45 testing the example 12:32 example 7 swagger 16:04 charging for your API 19:22 running your API as .py
"Serving LangChain apps automagically with FastApi"
#Classes #Encapsulation #Python #Setter #Getter
To avoid direct access of a class field i.e. private variables cannot be accessed directly or modified by external user, setter and getter methods are used.
Here I demonstrate a basic example of this.
Next time we'll look at @property decorators...(nothing to do with Dulux or dust sheets).
Check out the Minimalist online python IDE :
https://epyco.herokuapp.com/
https://epico.herokuapp.com/
Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi
...
https://www.youtube.com/watch?v=tfl-UXq8I_A
How to write code in C and compile and use the shared object ".so" file with Python. Full code on one screen for Python and C.
Become a patron : ? https://www.patreon.com/drpi
Buy me a coffee (or Tea) ☕ https://www.buymeacoffee.com/DrPi
Pytest with FastAPI course on "TestDriven.io":
-------------------------------------------------------------------------
https://testdriven.io/courses/tdd-fastapi/?utm_source=python360
https://testdriven.io/courses/scalable-fastapi-aws/?utm_source=python360
https://testdriven.io/courses/fastapi-celery/?utm_source=python360
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 5000 free API calls. No credit card required.)
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
Thumbs up yeah? (cos Algos..)
#cprogramming #tutorial #pythonprogramming
...
https://www.youtube.com/watch?v=-drPr7vfyBk
How to sort a list of dictionaries based on a dictionary value and then list them using get
-------------------------------------------------------------------------
You can buy bitcoin here ???
? https://www.swanbitcoin.com/python360
+ get $10 in BTC when you join Swan !!
--------------------------------------------------------------------------
? Become a patron ?
? https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)
Thumbs up yeah? (cos Algos..)
#dictionaries #lambda #python
...
https://www.youtube.com/watch?v=a6fI0jn0T7Y
Python argparse - tutorial showing how to use within a function
argeparse is the recommended command-line parsing module in the Python standard library
Based on : https://docs.python.org/3.10/howto/argparse.html#id1
*At the end I test with -vv and -v, had I not added 'v' at all it would simply return "20" !
? Become a patron ?
? https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
Thumbs up yeah? (cos Algos..)
#argparse #tutorials #pythonprogramming
...
https://www.youtube.com/watch?v=WmTwqX2b4mI
Programming using global variables in Python to solve the Collatz sequence.
Automate the boring stuff : https://amzn.to/2MEEmlK
Check out the Minimalist online python IDE :
https://epyco.herokuapp.com/
https://epico.herokuapp.com/
Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi
...
https://www.youtube.com/watch?v=1o0SrLDBvTk
Hello, this video shows how to convert text to an image
We will use Python with the Python Imaging Library 'Pillow'
The goal is to maximize the size of the text and crop the image to match, with user specified margin around it.
https://pypi.org/project/Pillow/
pip install Pillow
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)
-------------------------------------------------------------------------
You can buy bitcoin here ???
? https://www.swanbitcoin.com/python360
+ get $10 in BTC when you join Swan !!
--------------------------------------------------------------------------
? Become a patron ?
? https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Thumbs up yeah? (cos Algos..)
#pillow #texttoimage #python
...
https://www.youtube.com/watch?v=lhQb6h5hkzM
Poetry, Pytest, GitHub Actions.
Automate your python project creation and use GitHub actions to automatically test your code with every push.
In this GitHub Actions worfklow Tutorial we cover the following topics:
First we look at the process of creating a GithHub Repository, cloning the repo,starting poetry, and then doing a push back to GitHub.
Also, we'll see how GitHub actions provide you with the green badge to show users your code has passed its checks.
After the overview with screenshots we run through the through a hands-on DEMO, where I show the syntax of poetry, and the github actions workflow file, and the entire CI/CD pipeline setup with my example Python project.
◼️ "Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you."
◼️ "GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD"
◼️ "pytest is a mature full-featured Python testing tool that helps you write better programs."
-- chapters --
00:00 Intro
01:45 Workflow
03:22 Overview with screenshots
12:41 VSCode demo of project
20:05 Altering import path / "Module not found"
25:52 Configure GitHub actions
------------------------------------------------------------------------------
https://python-poetry.org/
https://packaging.python.org/
-------------------------------------------------------------------------
You can buy bitcoin here ???
? https://www.swanbitcoin.com/python360
+ get $10 in BTC when you join Swan !!
--------------------------------------------------------------------------
? Become a patron ?
? https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)
Thumbs up yeah? (cos Algos..)
#githubactions #poetry #python
...
https://www.youtube.com/watch?v=HNhjWqZaFog
Copy files to and from a Raspberry Pi to a Windows PC using WinSCP.
Official Site:
https://winscp.net/eng/download.php
Check out the Minimalist online python IDE :
https://epyco.herokuapp.com/
https://epico.herokuapp.com/
Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi
...
https://www.youtube.com/watch?v=SggaQTCgfyg
Short demo video showing Python code to use with Urban Dictionary API
prerequisites:
pip install requests
register for API key
create a .env file
uses requests with URL, headers, and params.
Visit redandgreen blog for more Tutorials
=========================================
? http://redandgreen.co.uk/about/blog/
Subscribe to the YouTube Channel
=================================
? https://www.youtube.com/c/DrPiCode
Follow on Twitter - to get notified of new videos
=================================================
? https://twitter.com/RngWeb
? Become a patron ?
? https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea)
☕ https://www.buymeacoffee.com/DrPi
Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! ?
? 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10
(You can also get started with 1000 free API calls. No credit card required.)
Thumbs up yeah? (cos Algos..)
#requests #API #python
...
https://www.youtube.com/watch?v=ud0e0_0ZyUQ