Jump to content

Graphing bitcoin in Houdini with python


The Batchman

Recommended Posts

Hey guys,

I'm very interested in anything with crypto currencies like Bitcoin. I've coded something together that grabs the current Bitcoin price from the web and throws it into Houdini as a 3d text.

qSDPtAY.png

I've also managed to get the Bitcoin price history and graph it inside Houdini.

Don't know tho whom it may be useful but look around or maybe even improve it. Maybe it might create new ideas.

Python code and example available in the attachment or at github.

The Batchman

Bitcoin.hipnc

  • Like 1
Link to comment
Share on other sites

On 3/30/2017 at 4:06 PM, 3dome said:

just downloaded it out of curiosity. getting an error on the python sop with line 1 "import requests"
it cant find that module. using H16
cheers

Oh dear! I thought python came with the requests library by default.

If you are on a Linux machine you can open up a terminal and enter the command:

pip install requests

If you are on a Mac or Windows machine I don't know how to get it to be honest. However I think this is a good start if you need this to work.

Hope you get it working!

Link to comment
Share on other sites

Note sure if totally related, but did you know that you can use http:// and ftp:// URI's directly in file fields in Houdini?  For example, you can refer to an image fetched by an http request directly in COPs, textures, backgrounds or wherever you encounter image paths.

 

PS. You can add your own -- see the FS_ReaderHelper/etc docs

Link to comment
Share on other sites

  • 3 weeks later...
On 4/7/2017 at 0:54 AM, Jason said:

Note sure if totally related, but did you know that you can use http:// and ftp:// URI's directly in file fields in Houdini?  For example, you can refer to an image fetched by an http request directly in COPs, textures, backgrounds or wherever you encounter image paths.

 

PS. You can add your own -- see the FS_ReaderHelper/etc docs

That is really cool! Didn't know that was possible with files too. Might be helpful one day.

I've noticed though that HTTPS is not supported, while HTTP is. I've tested this in my python script and also just checked this with a COP File node. Doesn't want to import anything HTTPS, the error generated from the python shell is the following.

/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:334: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html
#ssl-warnings

SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning

 

Link to comment
Share on other sites

Interesting, I didn't know that. Perhaps SideFX would have some insight if you wanted to solve this puzzle.

FWIW, we have implemented our own URI handlers pointed at our asset system using that class. It can be very intuitive if done right.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...