https://github.com/sirmaxx/fastapi-micro
fastapi microservice for job applyment
https://github.com/sirmaxx/fastapi-micro
Last synced: 3 months ago
JSON representation
fastapi microservice for job applyment
- Host: GitHub
- URL: https://github.com/sirmaxx/fastapi-micro
- Owner: SirmaXX
- Created: 2023-09-05T15:59:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-11T05:52:37.000Z (over 1 year ago)
- Last Synced: 2025-01-28T22:26:03.429Z (4 months ago)
- Language: Python
- Size: 487 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## KULLANILAN TASARIM KALIPLARI
Bütün sistem için api gateway yapısı ve her bir mikroservis için application factory pattern kullandım.
## Mikroservislerin dökümanları
kullanıcı servisinin dökümantasyonu:http://0.0.0.0:5002/docsapigateway servisinin dökümantasysonu:http://0.0.0.0:5003/docs
log servisinin dökümantasyonu:http://0.0.0.0:5004/docs
## Log servisinin kaynakçası
Önceden hazırladığım bir log servisini loglama için kullandım.Session loglar yerine çeşitli logları barındıran bir servis hazırladım.
https://github.com/SirmaXX/Log_manager
## Proje Nasıl Çalıştırılır
Aşağıdaki komutları yazarak projeyi çalıştırabilirsiniz.1. sudo docker-compose up --build
2. sudo make all
# Postman verisine nasıl erişilir
DenemeJsonCollection.postman_collection.json'ı postman'e entegre ederek kullanabilirsiniz# Testler nasıl çalıştırılır
Servislerdeki test_main.py dosyalarını
Aşağıdaki komut satırlarını sıra ile yazarak,backend servisi containerına erişerek unit testleri çalıştırabilirsiniz.sudo docker exec -it "servismi" /bin/bash
pytest
### ip whitelist örneği
https://github.com/SirmaXX/fastapi-micro/blob/main/ApiGateway/app/main.py#L24## rate limit örneği
https://github.com/SirmaXX/fastapi-micro/blob/main/ApiGateway/app/Routers/restapi.py#L31
## tokenizasyon örneği
kullanıcı servisi
https://github.com/SirmaXX/fastapi-micro/blob/main/User_Service/app/Routers/users.py#L232apigateway
https://github.com/SirmaXX/fastapi-micro/blob/main/ApiGateway/app/Routers/restapi.py#L91## Kaynakça
https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/
https://github.com/baranbartu/microservices-with-fastapi
https://www.youtube.com/watch?v=6hTRw_HK3Ts
https://stackoverflow.com/questions/66867814/fastapi-how-to-allow-endpoint-access-for-specific-ip-only## Eksiklikler