Could I integrate Python in Laravel?

Discussion in 'Python' started by Antigone, May 3, 2020.

  1. Antigone

    Antigone

    Joined:
    May 3, 2020
    Messages:
    1
    Likes Received:
    0
    Hello everyone,

    I'm a total noob and don't have a lot of knowledge in Python.

    I was wondering how I could integrate Python in Laravel? Could it be pertinent?

    Is it possible? Or Am I really random lol

    Thank you very much,
    A
     
    Antigone, May 3, 2020
    #1
    1. Advertisements

  2. Antigone

    niraeth

    Joined:
    May 4, 2020
    Messages:
    3
    Likes Received:
    0
    Yes you can. In fact with php, you can technically call scripts of any language, provided you have access to shell_exec.

    So to run your python script, just call exec or shell_exec on your python script.
    You can use Symfony Process to achieve this as well https://symfony.com/doc/current/components/process.html
     
    niraeth, May 4, 2020
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.