PHP bcrypt to PYTHON bycrypt not giving same values

Solution:

bcrypt use different salt each runtime that is why its perfect for storing password on database... unless you force it to use the same salt each time it will keep generating different resulting hash

Answer

Solution:

I found a solution in the Python api i call bcrypt in PHP using subprocess

code = """echo password_hash("""'"'+item.password+'"'""",PASSWORD_BCRYPT);"""
    hashed_password = await myClass.php(code)
  async def php(self, code):
        p = subprocess.Popen(["php", "-r", code],
                            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out = p.communicate()
        if out[1] != b'': raise Exception(out[1].decode('UTF-8'))
        return out[0].decode('UTF-8')

Source