omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Cryptography support

    Pythonista
    3
    7
    137
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kizik last edited by

      Is there any chance the Cryptography package can be incorporated in an upcoming release?

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        Are you looking for something from https://github.com/pyca ?

        An INCOMPLETE list...
        Pythonista version 3.4 (340006) running Python 3.10.4 on iOS 16.3 on an iPad8,6.
        ===============================
        | module        | local       |
        | name          | version     |
        | ------------- | ----------- |
        | arrow         | 1.2.3       |
        | bottle        | 0.13-dev    |
        | bs4           | 4.11.1      |
        | certifi       | 2022.6.15.1 |
        | Crypto        | 2.6         |
        | cycler        | 0.11.0      |
        | dateutil      | 2.8.2       |
        | dropbox       | 11.34.0     |
        | ecdsa         | 0.18.0      |
        | et_xmlfile    | 1.1.0       |
        | faker         | 14.2.0      |
        | feedparser    | 6.0.10      |
        | flask         | 2.2.2       |
        | html2text     | (2020, 1, 16) |
        | html5lib      | 1.1         |
        | httplib2      | 0.20.4      |
        | itsdangerous  | 2.1.2       |
        | jdcal         | 1.4.1       |
        | jedi          | 0.9.0       |
        | jinja2        | 3.1.2       |
        | libmodernize  | 0.8.0       |
        | markdown2     | 2.4.3       |
        | markupsafe    | 2.1.1       |
        | matplotlib    | 3.3.3+0.g5a4f1b675d.dirty |
        | mccabe        | 0.7.0       |
        | mpmath        | 1.2.1       |
        | numpy         | 1.22.3      |
        | oauth2        | 1.9.0.post1 |
        | paramiko      | 1.18.5      |
        | parsedatetime | 2.6         |
        | PIL           | 9.0.0       |
        | pycparser     | 2.21        |
        | pyflakes      | 2.5.0       |
        | pygments      | 2.13.0      |
        | pyparsing     | 3.0.9       |
        | PyPDF2        | 1.22        |
        | pytest        | 7.1.3       |
        | pytz          | 2022.2.1    |
        | reportlab     | 3.6.11      |
        | requests      | 2.28.1      |
        | six           | 1.16.0      |
        | sqlalchemy    | 1.4.41      |
        | sqlite3       | 2.6.0       |
        | sympy         | 1.11.1      |
        | wavebender    | 0.3         |
        | werkzeug      | 2.2.2       |
        | xmltodict     | 0.8.7       |
        | yaml          | 3.11        |
        | yapf          | 0.32.0      |
        | ------------- | ----------- |
        
        K 1 Reply Last reply Reply Quote 0
        • K
          kizik @ccc last edited by kizik

          @ccc I'm experimenting with Robin-Stocks, I've gotten to the last hurdle and not being able to build cryptography is stopping me dead in my tracks. It's a required dependency.

          I've managed to get my code up and running using Pyto (cryptography is included as a built in) but I cannot stand its interface. Pythonista is light years ahead with UI but this package is seriously holding me back...

          ccc 1 Reply Last reply Reply Quote 0
          • ccc
            ccc @kizik last edited by

            https://github.com/jmfernandes/robin_stocks ?

            K 1 Reply Last reply Reply Quote 0
            • K
              kizik @ccc last edited by kizik

              @ccc that's the one, it requires cryptography which can't be installed via pip on iOS due to the restrictions on building packages that rely on C.

              Could I, for example, pip install cryptography on a windows machine then copy the site package to iOS or are these packages built when run which requires them to be modified and included in the app itself?

              I need cryptography support for the project I'm building and have no idea if it's even possible without being a built in package.

              JonB 1 Reply Last reply Reply Quote 0
              • JonB
                JonB @kizik last edited by JonB

                @kizik pythonista comes with pycrypto. But unless @omz de decides to include cryptography in next version (it is a commonly requested module), you might be out of luck.

                What specifically are you using in cryptography? Sometimes there are alternatives that you could have wrappers for.

                Edit: oh, I see, you are using robin_stocks. The only part of cryptography used is cryptography.fernet. you might be able to create a wrapper to
                https://github.com/heroku/fernet-py/blob/master/fernet/fernet.py
                That is based on pyCrypto, so should work.

                to make it look like the cryptography.fernet.Fernet class. Looks like there really are just one or two methods that you have to wrap, if it doesn't work as is.

                To install, you can use wget with the archive URL instead of pip, then unzip.

                K 1 Reply Last reply Reply Quote 1
                • K
                  kizik @JonB last edited by

                  @JonB I'm still extremely new to all this. Sounds a bit more complicated than I'm prepared for. I was jumping for joy when I managed to get robin_stocks running in Pyto and that just took editing one line of code...

                  I'm quite literally using Pythonista to edit all the code and only using Pyto to press run.

                  Seems I'll be out of luck until I get a better understanding of things.. Appreciate the feedback and suggestions though, I'll keep this on my radar.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB Forums | Contributors