Spaces:
Sleeping
Sleeping
Z User
feat: ABM Engine v1 β OpenSearch store + Apify enrichment + ICP scoring + k-NN memory + optional Neo4j mirror
fb0ec21 Download app/config.py from sitcod3/abm-engine: direct link, hf CLI and curl.
- Browser
- Download file 3.4 kB
-
https://huggingface.co/spaces/sitcod3/abm-engine/resolve/main/app/config.py
- Command line
-
hf download hf://spaces/sitcod3/abm-engine/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/sitcod3/abm-engine/resolve/main/app/config.py
3.4 kB
| # ABM Engine configuration β all optional at boot, degrade gracefully. | |
| import os | |
| from typing import List | |
| from pydantic import ConfigDict | |
| from pydantic_settings import BaseSettings | |
| class Settings(BaseSettings): | |
| app_name: str = "FortyDN ABM Engine" | |
| app_version: str = "1.0.0" | |
| debug: bool = False | |
| # ββ Supabase identity (same project as the validator) ββββββββββββββββ | |
| supabase_url: str = "" | |
| supabase_service_role_key: str = "" | |
| license_enforcement: str = "" # "true" gates paid routes on licenses | |
| # ββ Aiven OpenSearch (primary store + search + k-NN vectors) βββββββββ | |
| os_url: str = "" | |
| os_user: str = "" | |
| os_password: str = "" | |
| os_index_prefix: str = "abm" | |
| # ββ Apify enrichment βββββββββββββββββββββββββββββββββββββββββββββββββ | |
| apify_token: str = "" | |
| apify_actor_google_maps: str = "sitcod3.lab/fdn-google-map-master-scraper" | |
| apify_actor_linkedin: str = "sitcod3.lab/linkedin-company-email-scraper" | |
| apify_run_timeout_s: int = 900 | |
| # ββ Optional graph mirror: BetterDB (managed Neo4j) or direct Aura βββ | |
| betterdb_url: str = "" | |
| betterdb_token: str = "" | |
| neo4j_uri: str = "" | |
| neo4j_user: str = "" | |
| neo4j_password: str = "" | |
| # ββ Optional Upstash Redis cache (REST) βββββββββββββββββββββββββββββ | |
| upstash_rest_url: str = "" | |
| upstash_rest_token: str = "" | |
| # ββ Embeddings βββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| embedding_provider: str = "auto" # auto | fastembed | hash | |
| embedding_dim: int = 384 | |
| # ββ ICP scoring defaults (override via env) βββββββββββββββββββββββββ | |
| icp_industries: str = "software,saas,technology,manufacturing,logistics,healthcare,finance,professional services" | |
| icp_countries: str = "united states,usa,canada,united kingdom,germany,netherlands,australia,denmark,sweden" | |
| icp_min_headcount: int = 10 | |
| icp_max_headcount: int = 2000 | |
| # ββ Access βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| api_key: str = "" # optional X-API-Key for service-to-service calls | |
| def icp_industries_list(self) -> List[str]: | |
| return [x.strip().lower() for x in self.icp_industries.split(",") if x.strip()] | |
| def icp_countries_list(self) -> List[str]: | |
| return [x.strip().lower() for x in self.icp_countries.split(",") if x.strip()] | |
| def os_configured(self) -> bool: | |
| return bool(self.os_url) | |
| def apify_configured(self) -> bool: | |
| return bool(self.apify_token) | |
| def graph_configured(self) -> bool: | |
| return bool((self.betterdb_url and self.betterdb_token) or self.neo4j_uri) | |
| def upstash_configured(self) -> bool: | |
| return bool(self.upstash_rest_url and self.upstash_rest_token) | |
| model_config = ConfigDict(env_file=".env", extra="ignore") | |
| settings = Settings() | |