Skip to content
site logo mobile

Forum in maintenance, we will back soon 🙂

learning API's
 
Notifications
Clear all

learning API's

25 Posts
4 Users
9 Likes
1,354 Views
(@albert-from-holland)
Posts: 2
New Member
Points: 16
Topic starter
 

What is the best and fastest way to learn all about APIs? Tips are appreciated 🙂 

 
Posted : 05/24/2023 5:45 pm
Topic Tags
SSAdvisor
(@ssadvisor)
Posts: 887
Noble Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 20321
 

Pick a website, I'll use Facebook as an example, then go to a search engine and search for "API Facebook Documentation".

Then study the API and play with it in your code editor.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/24/2023 6:33 pm
Hasan Aboul Hasan
(@admin)
Posts: 927
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 21848
 

Are you looking to learn about building APIs (programming) ? or selling APIs? No-code APIs? or everything!

I have a full course coming soon. But for now, you can start with the following:

 
Posted : 05/25/2023 9:00 am
Harshit reacted
(@albert-from-holland)
Posts: 2
New Member
Points: 16
Topic starter
 

@admin Thanks for the tips! i just want to build api's to automate my marketing work 🙂 We got a lot a customer data in Salesforce and i want to use i to make my work easier. Your tutorials to build programs with python and openai are very helpfull, and i'm now building an api with Xano. Looking forward for your api course 👍

 
Posted : 05/25/2023 5:42 pm
Hasan Aboul Hasan
(@admin)
Posts: 927
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 21848
 

@albert-from-holland Thank you too 🙂

 
Posted : 05/26/2023 1:13 pm
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

how to make api which can change image to text using fastapi

This post was modified 11 months ago by abdirahman
 
Posted : 05/27/2023 4:06 pm
Hasan Aboul Hasan
(@admin)
Posts: 927
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 21848
 

@abdirahman Friend, this question requires a full tutorial. please tell me what is your coding background to help you where to start

 
Posted : 05/28/2023 7:48 am
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

@admin I know some coding about python and fastai framework

 
Posted : 05/28/2023 2:38 pm
SSAdvisor
(@ssadvisor)
Posts: 887
Noble Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 20321
 

@abdirahman Does

Posted by: @abdirahman
know some coding
mean you've practiced it or just read about it? If you've practiced it do you have examples of your coding to get an understanding of what you know?

 

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/28/2023 7:17 pm
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

@ssadvisor Yeah I have this example

from fastapi import FastAPI, UploadFile, File
import pytesseract
from PIL import Image
import io

pytesseract.pytesseract.tesseract_cmd = r'E:\\Program Files\\Tesseract-OCR\\tesseract.exe'

app = FastAPI()

@app.post("/image-to-text")
async def image_to_text(image: UploadFile = File(...)):
    image_data = await image.read()
    image = Image.open(io.BytesIO(image_data))

    text = pytesseract.image_to_string(image)
    return {"text": text}
 
Posted : 05/29/2023 5:41 am
Hasan Aboul Hasan
(@admin)
Posts: 927
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 21848
 

@abdirahman I see you are using an OCR external executable to do this. where are you stuck, what is the problem?

 
Posted : 05/29/2023 7:46 am
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

@admin the problem is the API can't produce a good result at any time, I mean when I try to change some images it is not working.

 
Posted : 05/29/2023 5:56 pm
Hasan Aboul Hasan
(@admin)
Posts: 927
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 21848
 

@abdirahman in which languages?

if the problem is in the API itself, then I dont think you can doo much, it is better to think about another approach. I didn't test this API before.

 
Posted : 05/30/2023 10:11 am
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

@admin thanks hasan

 
Posted : 05/31/2023 6:39 am
SSAdvisor
(@ssadvisor)
Posts: 887
Noble Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 20321
 

What is the JSON result you get when you call the API? Also, how are you specifying the file to open?

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/31/2023 6:17 pm
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

I made Instagram downloader API and I used instaloader library then I deployed render and when I try to test I got this error:

{
  "error": "JSON Query to graphql/query: HTTP error code 401."
}
download (29)

 this is the how i wrote the code

from fastapi import FastAPI
import instaloader

app = FastAPI()

L = instaloader.Instaloader()
@app.get("/posts-reels-stories-igtv")
async def download_post(link: str = "https://www.instagram.com/p/Cs3leViPf63/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA"):
    try:
        post = instaloader.Post.from_shortcode(L.context, link.split("/")[-2])
        L.download_post(post, target="./download")
        return {"message": "Post downloaded successfully!"}
    except Exception as e:
        return {"error": str(e)}

 

 
Posted : 06/04/2023 6:13 am
Hasan Aboul Hasan
(@admin)
Posts: 927
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 21848
 

@abdirahman did you try running the code without using  fast api, just a simple script?

 
Posted : 06/04/2023 7:15 am
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

@admin I tried with fastAPI and it is working well but when I deploy it to render hosting it is not working.

 
Posted : 06/04/2023 8:45 am
Hasan Aboul Hasan
(@admin)
Posts: 927
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
Points: 21848
 

401 code is related to authorization, do you have any authorizations options on the hosting server?

 
Posted : 06/04/2023 12:25 pm
(@abdirahman)
Posts: 10
Active Member
Points: 34
 

@admin no 🤔

 
Posted : 06/04/2023 12:53 pm
Page 1 / 2
Share: