Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Initialize Project with Python and FastAPI #2

Open
arcane-engine bot opened this issue May 14, 2024 · 2 comments
Open

🚀 Initialize Project with Python and FastAPI #2

arcane-engine bot opened this issue May 14, 2024 · 2 comments

Comments

@arcane-engine
Copy link

arcane-engine bot commented May 14, 2024

To initialize the project with Python and FastAPI, follow these steps:

  1. Set up a virtual environment:

    • Run python3 -m venv venv to create a virtual environment.
    • Activate the virtual environment with source venv/bin/activate (Linux/Mac) or venv\Scripts\activate (Windows).
  2. Install FastAPI and Uvicorn:

    • Install FastAPI with pip install fastapi.
    • Install Uvicorn, an ASGI server, with pip install uvicorn.
  3. Create initial project files:

    • main.py: This will be the entry point of your application.
    • requirements.txt: List all the project dependencies here.
  4. Develop the API endpoint:

    • In main.py, import FastAPI and create an instance of it.
    • Define an endpoint that listens for POST requests. This endpoint will handle the JIRA webhook.
  5. Run the application:

    • Use the command uvicorn main:app --reload to run the application. Ensure app is the instance name of your FastAPI application in main.py.
  6. Test the application:

    • Use tools like Postman or curl to test the POST endpoint.

This issue will serve as a starting point for the project. Further refinement and detailed planning of the API endpoint that handles the JIRA webhook will be needed.

@mlamina
Copy link
Contributor

mlamina commented May 14, 2024

Copy link
Author

arcane-engine bot commented May 14, 2024

I've created the initial project files as requested:

  1. requirements.txt - Contains the dependencies for the project, including FastAPI and Uvicorn.
  2. main.py - Includes a basic FastAPI setup with an endpoint /webhook/jira designed to handle POST requests from JIRA webhooks. This endpoint parses the JIRA webhook payload into variables: issue_key, issue_summary, and issue_status, which you can use for further processing.

You can now proceed with testing and further development of the application.

PR: 🚀 Initial project setup with FastAPI and JIRA webhook endpoint

If you require further changes, continue our conversation over there!


📋 Log ↩️ Undo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant