introducemyself

in #introduceyourself6 years ago

introducemyself

Hi Steem! My name is ool. This is my first contact with this platform.
I know that there are many people who know technology.So I came here!
Share a great tool today, based on the python!

Tenacity

Tenacity is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything.

简单的来说 就是一个装饰器来完成处理异常并重试的功能

举个简单的例子如下:

import random
from tenacity import retry

@retry
def do_something_unreliable():
    a = random.randint(0, 10)
    print(a)
    if a > 5:
        raise IOError("Broken sauce, everything is hosed!!!111one")
    else:
        return "Awesome sauce!"

print(do_something_unreliable())

执行结果如下:

9
8
4
Awesome sauce!

上面的意思,就是 ,当随机的值大于5的时候发生异常,会继续执行这个函数,直到小于等于5的时候得到一个返回值。

有很多用途,比如写爬虫的时候,出现异常就会断掉 ,对程序的影响很大。有了这个类库就简单的多了

Sort:  

Welcome

thank you!

welcome

Posted using Partiko Android

thanks!

欢迎加入

谢谢 谢谢

Hello, ool, you're welcome. Keep going and enjoy it.

thank you!

Welcome ool!
eSteem is the application that improves your experience here. We have Mobile application for Android and iOS users. We also have developed Surfer Desktop application that helps you to gain new followers and stay connected with your friends, unique features - notifications, bookmarks, favorites, drafts, and more.
We reward our users with encouragement upvotes as well as monthly giveaways rewarding Spotlight top users and active Discord users.
Learn more: https://esteem.app
Join our discord: https://discord.gg/8eHupPq

thank you !

Welcome to Steem ool! Partiko is officially the fastest and most popular mobile app for Steem. Unlike other Steem apps, we take 0% cut of your earnings! You can also be rewarded with Partiko Points while using Partiko and exchange Partiko Points for upvotes!

Partiko for Android can be downloaded here on Google Play and the iOS version is available here on the App Store.

If you have more questions, feel free to join our Discord channel and ask @crypto.talk, we're always here to help!

Thank you so much for your interest!

Hi @ool, Welcome to the steemit platform. Hope you can have fun here. Please follow me and if you need help, I will help you.

Posted using Partiko Android

thank you and I have followed you.

Hi ool, welcome to steemit. Wish your every success in this tremendous community. Upvoted your introduction post. You can visit my blog @dindar
Have fun:-)

thank you and followed you.

Welcome to steemit @ool.

  • Join @minnowsupport project for more help
  • Checkout @helpie for daily trivias and useful information
  • Join @qurator a good quality support project
  • Checkout @steembasicincome
  • Help us save the forest with @treeplanter
    Follow me @tuanis for random votes daily please checkout the report
    Welcome the new steemians. Have a great day!

Congratulations @ool! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published your First Post
You made your First Vote
You got a First Vote
You received more than 10 upvotes. Your next target is to reach 50 upvotes.
You made your First Comment
You made more than 10 upvotes. Your next target is to reach 50 upvotes.
You made more than 10 comments. Your next target is to reach 50 comments.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

Be ready for the next contest!
Trick or Treat - Publish your scariest halloween story and win a new badge

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @ool!
Your post was mentioned in the Steemit Hit Parade for newcomers in the following category:

  • Comments - Ranked 3 with 23 comments

I also upvoted your post to increase its reward
If you like my work to promote newcomers and give them more visibility on Steemit, consider to vote for my witness!

Congratulations @ool! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 50 upvotes. Your next target is to reach 100 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

The new Steemfest³ Award is ready!

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @ool! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got your First payout

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemFest3 and SteemitBoard - Meet the Steemians Contest

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @ool! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!