alloyfyi
Python API client and CLI for metal alloys, compositions, and mechanical properties. Access 765 alloys across 12 families — including stainless steels, aluminum alloys, titanium grades, nickel superalloys, and high-entropy alloys — with tensile strength, yield strength, density, hardness, and application data. Zero dependencies.
Extracted from AlloyFYI, a metallurgy reference platform with 49 glossary terms, 72 educational guides, and comparison tools for engineers, materials scientists, and developers working with metal alloy selection and specification.
Explore alloys at alloyfyi.com — browse the alloy database, compare alloy families, and read the metallurgy glossary.
Table of Contents
- Install
- Quick Start
- What You Can Do
- Command-Line Interface
- MCP Server (Claude, Cursor, Windsurf)
- REST API Client
- API Reference
- Learn More About Alloys
- Also Available
- Science FYI Family
- FYIPedia Developer Tools
- License
Install
pip install alloyfyi # Core (zero deps)
pip install "alloyfyi[cli]" # + Command-line interface (typer, rich)
pip install "alloyfyi[mcp]" # + MCP server for AI assistants
pip install "alloyfyi[api]" # + HTTP client for alloyfyi.com API
pip install "alloyfyi[all]" # Everything
Or run instantly without installing:
uvx --from alloyfyi alloyfyi search stainless
Quick Start
from alloyfyi.api import AlloyFYI
with AlloyFYI() as api:
# Browse 765 alloys across 12 families
alloys = api.list_alloys(limit=10)
print(alloys["count"]) # 765 total alloys
# Explore alloy families — steel, aluminum, titanium, nickel, copper
families = api.list_families()
for family in families["results"]:
print(family["slug"])
# Search for specific alloy types or compositions
results = api.search("stainless steel")
print(results["count"])
What You Can Do
Alloy Families & Classification
Metal alloys are classified into 12 families based on their base metal and processing characteristics. Each family serves distinct engineering roles determined by mechanical properties, corrosion resistance, and cost.
| Family | Description | Typical Use |
|---|---|---|
| Stainless Steel | Fe-Cr alloys (>10.5% Cr) with corrosion resistance | Medical instruments, food processing, architecture |
| Carbon Steel | Fe-C alloys (0.05-2.0% C), most produced metal | Construction, automotive frames, pipelines |
| Alloy Steel | Fe + Cr, Mo, V, Ni for enhanced properties | Gears, shafts, pressure vessels |
| Tool Steel | High-hardness Fe alloys (W, Mo, V, Co) | Cutting tools, dies, molds |
| Structural Steel | Low-carbon steel for construction loads | Bridges, buildings, infrastructure |
| Spring Steel | High yield strength, elastic deformation | Automotive springs, industrial mechanisms |
| Bearing Steel | High-carbon chromium steel, fatigue resistant | Ball bearings, roller bearings |
| Aluminum Alloy | Al-base with Cu, Mg, Si, Zn additions | Aerospace, automotive, packaging |
| Titanium Alloy | Ti-base with Al, V, Mo for strength-to-weight | Aerospace, biomedical implants, marine |
| Nickel Alloy | Ni-base superalloys for extreme temperatures | Jet engines, gas turbines, chemical processing |
| Copper Alloy | Cu-base (brass, bronze, cupronickel) | Electrical wiring, plumbing, marine hardware |
| High-Entropy Alloy | 5+ principal elements in near-equal proportions | Research, next-generation aerospace, nuclear |
from alloyfyi.api import AlloyFYI
with AlloyFYI() as api:
# List all 12 alloy families
families = api.list_families()
for f in families["results"]:
print(f["slug"]) # stainless-steel, carbon-steel, aluminum-alloy, ...
# Get family details with member alloys
stainless = api.get_family("stainless-steel")
print(stainless)
Learn more: Alloy Families · Metallurgy Glossary · Alloy Guides
Mechanical Properties
Each alloy in the database includes key mechanical and physical properties used in engineering material selection. Properties follow international testing standards (ASTM, ISO).
| Property | Unit | What It Measures |
|---|---|---|
| Tensile Strength | MPa | Maximum stress before fracture |
| Yield Strength | MPa | Stress at onset of plastic deformation |
| Density | g/cm3 | Mass per unit volume |
| Hardness (Brinell) | HB | Resistance to indentation |
| Melting Point | C | Solid-to-liquid transition temperature |
Additionally, each alloy carries 6-point rating scores (1-10) for quick comparison:
| Rating | Meaning |
|---|---|
| Strength | Overall mechanical strength |
| Corrosion | Resistance to oxidation and chemical attack |
| Weight | Inverse of density (higher = lighter) |
| Machinability | Ease of cutting, drilling, and forming |
| Cost | Economic value (higher = more affordable) |
| Temperature | Performance at elevated temperatures |
from alloyfyi.api import AlloyFYI
with AlloyFYI() as api:
# Access mechanical properties for any of 765 alloys
alloy = api.list_alloys(limit=1)
detail = alloy["results"][0]
print(detail.get("yield_strength_mpa")) # e.g., 770.0
print(detail.get("density_g_cm3")) # e.g., 6.400
print(detail.get("rating_strength")) # e.g., 5
print(detail.get("rating_corrosion")) # e.g., 5
Learn more: Alloy Database · Alloy Guides
Industrial Applications
AlloyFYI catalogs 30 industrial applications linking alloy families to real-world engineering use cases — from aerospace turbine blades to surgical implants. Each application describes requirements, common alloy choices, and performance criteria.
from alloyfyi.api import AlloyFYI
with AlloyFYI() as api:
# Browse 30 application areas
apps = api.list_applications()
for app in apps["results"]:
print(app["slug"])
# Get application detail with recommended alloys
detail = api.get_application("aerospace")
Learn more: Applications · Metallurgy Glossary
Alloy Comparisons
Compare two alloys side-by-side across all mechanical properties and rating scores. Pre-computed comparisons highlight the differences in strength, weight, corrosion resistance, and cost for common alloy pairs.
from alloyfyi.api import AlloyFYI
with AlloyFYI() as api:
# Browse pre-computed alloy comparisons
comparisons = api.list_comparisons(limit=5)
for comp in comparisons["results"]:
print(comp["slug"])
Learn more: Alloy Comparisons · Alloy Guides
Command-Line Interface
pip install "alloyfyi[cli]"
alloyfyi search stainless # Search alloys, families, applications
alloyfyi search "titanium grade 5" # Search by grade name
alloyfyi search aerospace # Search applications
MCP Server (Claude, Cursor, Windsurf)
Add alloy lookup tools to any AI assistant that supports Model Context Protocol.
pip install "alloyfyi[mcp]"
Add to your claude_desktop_config.json:
{
"mcpServers": {
"alloyfyi": {
"command": "uvx",
"args": ["--from", "alloyfyi[mcp]", "python", "-m", "alloyfyi.mcp_server"]
}
}
}
REST API Client
pip install "alloyfyi[api]"
from alloyfyi.api import AlloyFYI
with AlloyFYI() as api:
alloys = api.list_alloys() # GET /api/v1/alloys/
families = api.list_families() # GET /api/v1/families/
apps = api.list_applications() # GET /api/v1/applications/
comparisons = api.list_comparisons() # GET /api/v1/comparisons/
results = api.search("titanium") # GET /api/v1/search/?q=titanium
Example
curl -s "https://alloyfyi.com/api/v1/families/" | python3 -m json.tool
{
"count": 12,
"results": [
{"slug": "stainless-steel"},
{"slug": "carbon-steel"},
{"slug": "aluminum-alloy"},
{"slug": "titanium-alloy"},
{"slug": "nickel-alloy"},
{"slug": "copper-alloy"},
{"slug": "high-entropy-alloy"}
]
}
Full API documentation at alloyfyi.com/developers/.
API Reference
| Method | Description |
|---|---|
list_alloys(**params) |
List all 765 alloys with pagination |
get_alloy(slug) |
Get alloy detail with properties and ratings |
list_families(**params) |
List all 12 alloy families |
get_family(slug) |
Get family detail with member alloys |
list_applications(**params) |
List 30 industrial applications |
get_application(slug) |
Get application detail |
list_alloy_applications(**params) |
List alloy-application links |
get_alloy_application(slug) |
Get alloy-application detail |
list_comparisons(**params) |
List alloy comparisons |
get_comparison(slug) |
Get side-by-side comparison |
list_glossary(**params) |
List 49 metallurgy glossary terms |
get_term(slug) |
Get glossary term definition |
list_guides(**params) |
List 72 educational guides |
get_guide(slug) |
Get guide content |
search(query) |
Search across all alloy content |
Learn More About Alloys
- Browse: Alloy Database · Alloy Families · Applications
- Compare: Alloy Comparisons
- Reference: Metallurgy Glossary
- Guides: Educational Guides
- API: REST API Docs · OpenAPI Spec
Also Available
| Platform | Install | Link |
|---|---|---|
| npm | npm install alloyfyi |
npm |
| MCP | uvx --from "alloyfyi[mcp]" python -m alloyfyi.mcp_server |
Config |
Science FYI Family
Part of the FYIPedia open-source developer tools ecosystem — physical sciences, chemistry, geology, astronomy, and materials.
| Package | PyPI | npm | Description |
|---|---|---|---|
| chemfyi | PyPI | npm | Periodic table, 500 compounds, 371 reactions — chemfyi.com |
| alloyfyi | PyPI | npm | 765 metal alloys, 12 families, compositions — alloyfyi.com |
| gemfyi | PyPI | npm | 442 gemstones, Mohs scale, grading — gemfyi.com |
| starfyi | PyPI | npm | 119,602 stars, 6,128 exoplanets, 13,305 deep-sky objects — starfyi.com |
| mineralfyi | PyPI | npm | 6,215 minerals, 7 crystal systems — mineralfyi.com |
FYIPedia Developer Tools
| Package | PyPI | npm | Description |
|---|---|---|---|
| colorfyi | PyPI | npm | Color conversion, WCAG contrast, harmonies — colorfyi.com |
| emojifyi | PyPI | npm | Emoji encoding & metadata for 3,953 emojis — emojifyi.com |
| symbolfyi | PyPI | npm | Symbol encoding in 11 formats — symbolfyi.com |
| unicodefyi | PyPI | npm | Unicode lookup with 17 encodings — unicodefyi.com |
| fontfyi | PyPI | npm | Google Fonts metadata & CSS — fontfyi.com |
| distancefyi | PyPI | npm | Haversine distance & travel times — distancefyi.com |
| timefyi | PyPI | npm | Timezone ops & business hours — timefyi.com |
| namefyi | PyPI | npm | Korean romanization & Five Elements — namefyi.com |
| unitfyi | PyPI | npm | Unit conversion, 220 units — unitfyi.com |
| holidayfyi | PyPI | npm | Holiday dates & Easter calculation — holidayfyi.com |
| cocktailfyi | PyPI | — | Cocktail ABV, calories, flavor — cocktailfyi.com |
| fyipedia | PyPI | — | Unified CLI: fyi alloy info stainless-steel — fyipedia.com |
| fyipedia-mcp | PyPI | — | Unified MCP hub for AI assistants — fyipedia.com |
License
MIT
Metadata
Release files for alloyfyi 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alloyfyi-0.1.1.tar.gz | 646.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alloyfyi-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 656.1 kB
Release files / alloyfyi-0.1.1.tar.gz
| Download URL | alloyfyi-0.1.1.tar.gz |
|---|---|
| Size | 646.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8b6560c1b2bee77e595f4b8d1d52a7f147ced4c44790b7c9641852f17d09112
|
|
BLAKE2b-256 checksum How to use checksums |
696acac401f89bf1b7d5f66e7521f27def904346650e56706d6364eefd18e0dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / alloyfyi-0.1.1-py3-none-any.whl
| Download URL | alloyfyi-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a515f79ea25be8fa00c538cab2cb1f94f612cfa90e090613f5902456b0beec94
|
|
BLAKE2b-256 checksum How to use checksums |
68cbf49f9b43e914fc544e3175ab163a21de4e39f510d14fa5ad23815c4b0ffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|