<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DenyS</title>
    <description>The latest articles on DEV Community by DenyS (@animatea).</description>
    <link>https://dev.to/animatea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F596592%2Fbe612b6e-1eaa-4259-84de-9051115fe152.jpeg</url>
      <title>DEV Community: DenyS</title>
      <link>https://dev.to/animatea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/animatea"/>
    <language>en</language>
    <item>
      <title>I made a MongoDB migration tool</title>
      <dc:creator>DenyS</dc:creator>
      <pubDate>Mon, 12 Jun 2023 22:12:55 +0000</pubDate>
      <link>https://dev.to/animatea/i-made-a-mongodb-migration-tool-3e94</link>
      <guid>https://dev.to/animatea/i-made-a-mongodb-migration-tool-3e94</guid>
      <description>&lt;p&gt;Hi Everyone! I made a MongoDB migration tool. Mongorunway designed to help users make the migration process as easy and convenient as possible.&lt;/p&gt;

&lt;p&gt;Easy to use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;__future__&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;annotations&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;typing&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;mongorunway&lt;/span&gt;

&lt;span class="c1"&gt;# Required, used by Mongorunway.
&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;


&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;mongorunway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;migration&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;upgrade&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mongorunway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MigrationCommand&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;  &lt;span class="c1"&gt;# List of commands to upgrade
&lt;/span&gt;        &lt;span class="n"&gt;mongorunway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create_collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"abc"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;


&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;mongorunway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;migration&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;downgrade&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mongorunway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MigrationCommand&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;  &lt;span class="c1"&gt;# List of commands to downgrade
&lt;/span&gt;        &lt;span class="n"&gt;mongorunway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drop_collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"abc"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tool also has many other useful components, more details on the project documentation website.&lt;/p&gt;

&lt;p&gt;Documentation: &lt;a href="https://animatea.github.io/mongorunway/"&gt;https://animatea.github.io/mongorunway/&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/Animatea/mongorunway"&gt;https://github.com/Animatea/mongorunway&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>devops</category>
      <category>mongodb</category>
    </item>
    <item>
      <title>Python-Multibar</title>
      <dc:creator>DenyS</dc:creator>
      <pubDate>Wed, 21 Sep 2022 14:18:15 +0000</pubDate>
      <link>https://dev.to/animatea/python-multibar-1opn</link>
      <guid>https://dev.to/animatea/python-multibar-1opn</guid>
      <description>&lt;p&gt;&lt;strong&gt;Python-Multibar&lt;/strong&gt;, flexible library for creating static progress bars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Github&lt;/strong&gt;: &lt;a href="https://github.com/Animatea/python-multibar"&gt;https://github.com/Animatea/python-multibar&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Documentation&lt;/strong&gt;: &lt;a href="https://animatea.github.io/python-multibar/"&gt;https://animatea.github.io/python-multibar/&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;PyPi&lt;/strong&gt;: &lt;a href="https://pypi.org/project/python-multibar/"&gt;https://pypi.org/project/python-multibar/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;~ Quickstart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;multibar&lt;/span&gt;

&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;writer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;multibar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ProgressbarWriter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;progressbar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Using __str__() method, we get a progressbar
# with a default signature.
&lt;/span&gt;&lt;span class="n"&gt;Out&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'+-----'&lt;/span&gt;

&lt;span class="c1"&gt;# Writer returns progressbar object.
&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;progressbar&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;Out&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="nc"&gt;multibar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;impl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;progressbars&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Progressbar&lt;/span&gt;&lt;span class="s"&gt;'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more examples see quickstart in documentation and github examples!&lt;/p&gt;

&lt;p&gt;Example of discord leveling-bot, using python-multibar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/Animatea/python-multibar/blob/main/examples/discord_example/"&gt;https://github.com/Animatea/python-multibar/blob/main/examples/discord_example/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>showdev</category>
      <category>tooling</category>
      <category>programming</category>
    </item>
    <item>
      <title>Tense - Time Processing Tool (Refactored)</title>
      <dc:creator>DenyS</dc:creator>
      <pubDate>Wed, 22 Jun 2022 16:13:27 +0000</pubDate>
      <link>https://dev.to/animatea/tense-time-processing-tool-refactored-4ngg</link>
      <guid>https://dev.to/animatea/tense-time-processing-tool-refactored-4ngg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Tense 1.0.0b release!&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/Animatea/tense"&gt;https://github.com/Animatea/tense&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's new?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;aiotense&lt;/code&gt; -&amp;gt; &lt;code&gt;tense&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The project is completely redone and optimized for parsing. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By refactoring the project, we got a &lt;code&gt;~x22.31&lt;/code&gt; speedup in processing complex strings (&lt;em&gt;using smart_resolver&lt;/em&gt;).&lt;br&gt;
   -&amp;gt; Was: &lt;em&gt;~0.00095030...μs&lt;/em&gt; | Now: &lt;em&gt;~0.00004260...μs&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;~x38.28&lt;/code&gt; speed up processing simple strings (&lt;em&gt;using basic_resolver&lt;/em&gt;).&lt;br&gt;
   -&amp;gt; Was: &lt;em&gt;~0.00062400...μs&lt;/em&gt; | &lt;em&gt;Now: ~0.00001630...μs&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Documentation here:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://animatea.github.io/tense/"&gt;https://animatea.github.io/tense/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not familiar with the project yet?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;tense&lt;/code&gt; - flexible time parsing tool.&lt;br&gt;
Use existing functionality, create your own!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create your own converters&lt;/li&gt;
&lt;li&gt;Add your own units of time&lt;/li&gt;
&lt;li&gt;Create your own parsers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Coming soon:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add your aliases to the numbers!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Simple example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;tense&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TenseParser&lt;/span&gt;

&lt;span class="n"&gt;time_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"1d2minutes 5 sec"&lt;/span&gt;

&lt;span class="n"&gt;digit_parser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TenseParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TenseParser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DIGIT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;digit_parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time_string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;86525&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more information see GitHub page!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>python</category>
      <category>programming</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Aiotense - Time Processing Tool</title>
      <dc:creator>DenyS</dc:creator>
      <pubDate>Sat, 11 Jun 2022 07:39:01 +0000</pubDate>
      <link>https://dev.to/animatea/aiotense-time-processing-tool-5gk2</link>
      <guid>https://dev.to/animatea/aiotense-time-processing-tool-5gk2</guid>
      <description>&lt;p&gt;&lt;strong&gt;aiotense&lt;/strong&gt; - python time parsing tool.&lt;/p&gt;

&lt;p&gt;GitHub - &lt;a href="https://github.com/Animatea/aiotense"&gt;https://github.com/Animatea/aiotense&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Documentation - &lt;a href="https://animatea.github.io/aiotense/"&gt;https://animatea.github.io/aiotense/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;aiotense&lt;/strong&gt; is a tool that converts a string like "1day1minute 20seconds" into number of seconds or timedelta objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;asyncio&lt;/span&gt; 
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;aiotense&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TenseParser&lt;/span&gt;  

&lt;span class="n"&gt;time_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"1d2minutes 5 sec"&lt;/span&gt;

&lt;span class="c1"&gt;# &amp;lt;-- Digit parser --&amp;gt; 
&lt;/span&gt;&lt;span class="n"&gt;digit_parser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TenseParser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TenseParser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DIGIT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="n"&gt;digit_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;digit_parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time_string&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; 
&lt;span class="c1"&gt;# &amp;lt;-- Assertions --&amp;gt; 
&lt;/span&gt;&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;digit_value&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;86525&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you need case insensitivity, you can use resolvers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Custom parsing sequence - custom resolvers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Need to convert result to string? You can write your own converter by inheriting &lt;code&gt;aiotense.application.ports.converters.AbstractConverter&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Need to cache the result? Write your own parser by inheriting &lt;code&gt;aiotense.application.ports.parsers.AbstractParser&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;aiotense&lt;/strong&gt; has been designed with maximum flexibility, practicality and user friendliness in mind. I hope our project helped you or you were just interested in seeing it.&lt;/p&gt;

</description>
      <category>python</category>
      <category>showdev</category>
      <category>tooling</category>
      <category>programming</category>
    </item>
    <item>
      <title>My first post</title>
      <dc:creator>DenyS</dc:creator>
      <pubDate>Mon, 15 Mar 2021 09:05:24 +0000</pubDate>
      <link>https://dev.to/animatea/my-first-post-1jn0</link>
      <guid>https://dev.to/animatea/my-first-post-1jn0</guid>
      <description>&lt;p&gt;Hello! I am currently developing Animatea (bot for discord), soon I will finish it and put it on hosting, I will be grateful for your opinion!&lt;/p&gt;

</description>
      <category>python</category>
      <category>discord</category>
      <category>bots</category>
    </item>
  </channel>
</rss>
