Skip to main content

Blacksmith

Documentation Continuous Integration Coverage Report

Blacksmith is a library to build a solid microservices architecture based on REST API.

Todays, developers have lots of choices to create microservices, plenty of framework are available, but when it comes to consume them, there is a lack of clients.

Consuming an API is not just about doing HTTP requests, it has to be designed for failure, monitoring, and service discovery with an elegant abstraction. blacksmith aims to provide a solution for developers to write clean client code and for ops to monitor api calls also on the client side.

What is Blacksmith

Blacksmith is a declarative tool for consuming REST Api.

In a REST API, resources are declared under HTTP routes, and every http verb has its own definition.

In Blacksmith, every resources are bound to schemas that define request and response, in order to abstract HTTP.

This is a common concept for SQL table with ORM, where tables are bound to models, and then, operations are available on models. This is a usefull abstraction to write maintainable code and to dive into a project easilly.

Handling API resources using an http client, such as requests does not handle that abstraction, and does not handle bindings to objects, and can be compared to a raw connection because it is just a transport.

This is the problem blacksmith is trying to solve, having a nice abstraction of services that use REST in a microservices architecture.

Why not using a SDK to consume APIs ?

SDK are about importing an external library in a service. And a service is consumed by many services for different purpose. As a result, SDK create coupling between service, and this is something that should be avoid.

An SDK for a service will declare all the resources, routes, and attribute of resources when a service consumer may consume just a few.

SDK may hide what is really used by every service.

To avoid this, every consumers of API, should declare its own consumers contracts to get a better view of which service use what.

Building SDK

By the way, blacksmith can be use to build a SDK for public API.

Working with or without asyncio

Blacksmith is written for asyncio, but works with synchronous API without overhead. The synchronous API is generated using unasync and tested.

Read More

You can read the full documentation of this library here.

Metadata

Release files for Blacksmith 5.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Blacksmith 5.2.0
File Size Uploaded Provenance Actions
blacksmith-5.2.0.tar.gz 42.5 kB Without provenance Details for blacksmith-5.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Blacksmith 5.2.0
File Interpreter ABI Platform Actions
blacksmith-5.2.0-py3-none-any.whl Python 3 none any Details for blacksmith-5.2.0-py3-none-any.whl

Total release size: 112.7 kB

Release files / blacksmith-5.2.0.tar.gz

Download URL blacksmith-5.2.0.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c3e59c359e124a41b9df38758b9aee7b65f8ffbb7e8a6ef70730a2e8969a1953
BLAKE2b-256 checksum
How to use checksums
1f86602d3c7ab67a497ddba44a49db3d6248c11560f9c441413bb9b09ec75d1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.7 CPython/3.12.16 Linux/7.0.0-1017-azure

Release files / blacksmith-5.2.0-py3-none-any.whl

Download URL blacksmith-5.2.0-py3-none-any.whl
Size 70.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a6e81f107b3a1d51168cf6c0cec0ddae9b6a11e4e5379f959a0046b569314a6
BLAKE2b-256 checksum
How to use checksums
9fd841d1125467bab48c43805c4790ba440908700fa288b9f5d5dad264cfc89a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.7 CPython/3.12.16 Linux/7.0.0-1017-azure

Security for Blacksmith 5.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

5.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page