Hi Team, I am completely new to PACT and started w...
# pact-python
p
Hi Team, I am completely new to PACT and started working on already available framework in my current company but I am getting error below when we import ,as its saying that cant find reference verifier in spite of having PACTMAN installed from pactman.verifier.broker_pact import BrokerPacts, pact_id, BrokerPact Could you please help me to get rid of this error ?
m
Just an FYI that Pactman is not an officially supported Pact client library. I think a few people use it in here 😛
p
I tried with PACT and PACT python as well but that also dint work ,Is there any other way to get rid of this error 🙂
m
PACT python as well but that also dint work
what didn’t work about it?
p
I installed PACT PYTHON and was trying to import verifier.broker_pact import BrokerPacts, pact_id, BrokerPact
which wasnt working for me
m
Are you following some guide or something? They are two completely different packages, so I’m not surprised it wouldn’t work in both. Perhaps if you can go back a step and share what you’re doing that would help
p
Yeah I will check with senior the one who is familiar with that framework and get back, Thanks Matt 🙂
👍 1
m
There are a few example projects about, including the one in the pact-python project itself - i’d start there
P.S. it’s “Pact” not “PACT” 🙂
🙃 1
p
Can I get any link I can refer where we are using pact-python for example projects ?
m
p
Thank you so much 🙂
m
You're welcome
p
Hey Matt !! Needed your help in getting confirmation on is Pact python is the library which is replacing Pactman ?
m
No, pact-python has always been the official lib
Pactman is not, and has not been an official lib
(that’s not to say it wasn’t a good library or anything!)
p
So can we use Pactman still ?
or should we replace it with official libraries ?
m
I would suggest you don’t. It’s not supported by Pact and it’s not supported by its previous author/maintainer
p
okay...So now if I wanna use the packages I was importing earlier from Pactman for eg like below, How can I get the same from pact python ?
m
You can’t just convert pactman to pact-python. They are different libraries.
I’d suggest going to the Pact Python project and starting from their examples/docs
p
okay will do that !! Thank you !!
👍 1