Home / File/ sponsors.py — fastapi Source File

sponsors.py — fastapi Source File

Architecture documentation for sponsors.py, a python file in the fastapi codebase. 11 imports, 0 dependents.

File python FastAPI Applications 11 imports 5 functions 9 classes

Entity Profile

Dependency Diagram

graph LR
  056ab1dd_e9bf_db94_7561_c9133dc915c2["sponsors.py"]
  a4a63925_76bf_e8a8_bef2_cb86d161a300["logging"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> a4a63925_76bf_e8a8_bef2_cb86d161a300
  05832956_b384_ff7e_ef60_abebb23f9723["secrets"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> 05832956_b384_ff7e_ef60_abebb23f9723
  c16959b6_d471_41f8_1c0e_2c4fe324727a["subprocess"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> c16959b6_d471_41f8_1c0e_2c4fe324727a
  36df6c22_bdda_c58d_8489_1b2bca07e51a["collections"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> 36df6c22_bdda_c58d_8489_1b2bca07e51a
  b3e303a2_3f2d_638d_930c_3a5dcc2f5a42["pathlib"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> b3e303a2_3f2d_638d_930c_3a5dcc2f5a42
  0dda2280_3359_8460_301c_e98c77e78185["typing"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> 0dda2280_3359_8460_301c_e98c77e78185
  d7bf38e8_5abd_e43f_3d05_a07033f7302e["httpx"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> d7bf38e8_5abd_e43f_3d05_a07033f7302e
  67785272_06f8_d6cb_1f4a_abf8bc11d004["yaml"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> 67785272_06f8_d6cb_1f4a_abf8bc11d004
  319484c7_306f_9ec1_3de4_788004953d77["github"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> 319484c7_306f_9ec1_3de4_788004953d77
  6913fbd4_39df_d14b_44bb_522e99b65b90["pydantic"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> 6913fbd4_39df_d14b_44bb_522e99b65b90
  d2280984_30d0_0ee6_97ed_95cfcc358f18["pydantic_settings"]
  056ab1dd_e9bf_db94_7561_c9133dc915c2 --> d2280984_30d0_0ee6_97ed_95cfcc358f18
  style 056ab1dd_e9bf_db94_7561_c9133dc915c2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import logging
import secrets
import subprocess
from collections import defaultdict
from pathlib import Path
from typing import Any

import httpx
import yaml
from github import Github
from pydantic import BaseModel, SecretStr
from pydantic_settings import BaseSettings

github_graphql_url = "https://api.github.com/graphql"


sponsors_query = """
query Q($after: String) {
  user(login: "tiangolo") {
    sponsorshipsAsMaintainer(first: 100, after: $after) {
      edges {
        cursor
        node {
          sponsorEntity {
            ... on Organization {
              login
              avatarUrl
              url
            }
            ... on User {
              login
              avatarUrl
              url
            }
          }
          tier {
            name
            monthlyPriceInDollars
          }
        }
      }
    }
  }
}
"""


class SponsorEntity(BaseModel):
    login: str
    avatarUrl: str
    url: str


class Tier(BaseModel):
    name: str
    monthlyPriceInDollars: float


class SponsorshipAsMaintainerNode(BaseModel):
    sponsorEntity: SponsorEntity
// ... (163 more lines)

Domain

Subdomains

Dependencies

  • collections
  • github
  • httpx
  • logging
  • pathlib
  • pydantic
  • pydantic_settings
  • secrets
  • subprocess
  • typing
  • yaml

Frequently Asked Questions

What does sponsors.py do?
sponsors.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Applications subdomain.
What functions are defined in sponsors.py?
sponsors.py defines 5 function(s): get_graphql_response, get_graphql_sponsor_edges, get_individual_sponsors, main, update_content.
What does sponsors.py depend on?
sponsors.py imports 11 module(s): collections, github, httpx, logging, pathlib, pydantic, pydantic_settings, secrets, and 3 more.
Where is sponsors.py in the architecture?
sponsors.py is located at scripts/sponsors.py (domain: FastAPI, subdomain: Applications, directory: scripts).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free