Hello people, My project uses FastAPI and OpenAPI ...
# pactflow-ama
g
Hello people, My project uses FastAPI and OpenAPI schemas. Can someone recommend what library or libraries I should use with these? Any leads are highly appreciated.
j
If you're using FastAPI, then I gather your codebase is in Python. If so, to get started integrating Pact, you would use Pact Python 🙂 Note that schemas and contracts are different things. There's a blog post about that by Matt which is relevant for this: https://pactflow.io/blog/schemas-are-not-contracts/. (Unless I misunderstood your question entirely, in which case feel free to elaborate).
m
I suspect you're perhaps asking about our bidirectional contract testing feature?
g
Hello @Matt (pactflow.io / pact-js / pact-go), Indeed!
Will Pact Python serve my needs in this case?
m
So on the consumer side, yes you can use Pact Python or you can BYO mocking tool so long as you can convert the mocks into a pact file (see https://docs.pactflow.io/docs/bi-directional-contract-testing/consumer)
on the provider side, you can use any API testing tool that you look - I don’t have any specific recommendations for Python, but they can be functional testing tools like Dredd, ReadyAPI, Schemathesis or unit testing tools like what seems to come with FastAPI itself (see https://docs.pactflow.io/docs/bi-directional-contract-testing/provider)