proxy schema
| 3 | |
| 4 | @attrs |
| 5 | class Proxy(object): |
| 6 | """ |
| 7 | proxy schema |
| 8 | """ |
| 9 | host = attr(type=str, default=None) |
| 10 | port = attr(type=int, default=None) |
| 11 | |
| 12 | def __str__(self): |
| 13 | """ |
| 14 | to string, for print |
| 15 | :return: |
| 16 | """ |
| 17 | return f'{self.host}:{self.port}' |
| 18 | |
| 19 | def string(self): |
| 20 | """ |
| 21 | to string |
| 22 | :return: <host>:<port> |
| 23 | """ |
| 24 | return self.__str__() |
| 25 | |
| 26 | |
| 27 | if __name__ == '__main__': |
no outgoing calls