LocalBiz Schema Generator Code
Generate schema.org JSON-LD and formatted citations for local business
Brought to you by:
aisoftwarelabs
| File | Date | Author | Commit |
|---|---|---|---|
| LICENSE | 2026-01-15 |
|
[d6bf47] Initial commit |
| README.md | 2026-01-15 |
|
[d6bf47] Initial commit |
| localbiz_schema.py | 2026-01-15 |
|
[d6bf47] Initial commit |
A lightweight Python utility for generating structured data (JSON-LD schema.org markup) and formatted citations for local businesses.
git clone https://git.code.sf.net/p/localbiz-schema-generator/code
cd localbiz-schema-generator
from localbiz_schema import generate_schema, get_business_type
schema = generate_schema(
name="Joe's Plumbing",
address="123 Main Street",
city="Austin",
state="TX",
zipcode="78701",
phone="(512) 555-0123",
website="https://joesplumbing.com",
business_type=get_business_type("plumber")
)
from localbiz_schema import format_citation
citation = format_citation(
name="Joe's Plumbing",
address="123 Main Street",
city="Austin",
state="TX",
zipcode="78701",
phone="(512) 555-0123"
)
# Output:
# Joe's Plumbing
# 123 Main Street
# Austin, TX 78701
# (512) 555-0123
from localbiz_schema import generate_schema, schema_to_html
schema = generate_schema(...)
html = schema_to_html(schema)
# Output: <script type="application/ld+json">...</script>
| Industry | Schema Type |
|---|---|
| restaurant | Restaurant |
| plumber | Plumber |
| electrician | Electrician |
| locksmith | Locksmith |
| hvac | HVACBusiness |
| lawyer | LegalService |
| dentist | Dentist |
| doctor | Physician |
| realtor | RealEstateAgent |
| auto_repair | AutoRepair |
| salon | BeautySalon |
| gym | HealthClub |
| hotel | Hotel |
| store | Store |
| contractor | GeneralContractor |
See the Wiki for real-world output examples across various business types and industries.
MIT License - see LICENSE file.
Pull requests welcome. For major changes, please open an issue first.