Python and 1C: Microservice with FastAPI

Published: 26 April 2023
on channel: nizamov school
5,551
167

Hello 1C programmers, Ilya Nizamov with you.

Flagship course "AI for 1C": https://nizamov.school/courses/ai/cha...
Author's Telegram channel: https://t.me/+9iyfWeGqvMg2NTcy
Website and blog: https://nizamov.school/

Recently, there have been several questions about using 1C and Python. This can be done in various ways, but I find microservice development the most convenient. In this lesson, we'll use FastAPI; it's a fast web framework and perfectly suited for our needs.

There was also a request to protect configuration and extensions. I'm against such protections, as anyone who wants to can hack them, and it will cause a lot of problems for legitimate customers. This problem can be solved by moving some of the logic to a microservice and hosting it in the cloud. Alternatively, you can compile the Python code after protecting it first.

This lesson will be short. Give it a like if you found this helpful, subscribe to the channel and Telegram, and let's get started.

Article on the website
https://nizamov.school/python-1c-mikr...

Timecodes:
00:00:00 — Why a microservice on FastAPI and code security
00:01:20 — Installing FastAPI, Uvicorn, and imports
00:02:00 — Pydantic model and POST handling function
00:04:00 — Launching a microservice and documentation
00:05:21 — Request from 1C to the service
00:08:01 — Packaging in Docker: Dockerfile
00:10:44 — .dockerignore and docker-compose.yml
00:13:22 — Building and running the container, checking from 1C


On this page of the site you can watch the video online Python and 1C: Microservice with FastAPI with a duration of hours minute second in good quality, which was uploaded by the user nizamov school 26 April 2023, share the link with friends and acquaintances, this video has already been watched 5,551 times on youtube and it was liked by 167 viewers. Enjoy your viewing!