Skip to main content

A set of tools for knitters to create charts and eventually more.

Project description

pyKnit

A set of tools for knitters to do math, create charts, and eventually more.

pyknit On PyPI

Usage

pyKnit works best in conjunction with Jupyter. This allows you to "mess around" with the functions and see the results in your browser. I like this especially for the ability to display the charts inline.

Make sure you install Jupyter and pyknit in the same place (e.g. in the same virtualenv if you're using one) so that you can use import pyknit and have it work. (You can read more about how to install a python Package in Jupyter here.)

I prefer to use virtualenv and pip, so I set up my environment as follows:

virtualenv -p python 3.8 venv-3.8-jupyter
source ~/venv-3.8-jupyter/bin/activate
pip install jupyterlab
pip install pyknit
jupyter-lab

From there, jupyter lab will open in a browser, and you can create a new notebook to play around. When you're done, you can shut down the notebook server using ^C in the console and typing y when it asks if you want to shut down. You can deactivate the virtualenv by typing deactivate and pressing enter.

If you want to run it again later, you can do the following:

source ~/venv-3.8-jupyter/bin/activate
jupyter-lab

(The virtualenv only needs to be created once, and you don't need to reinstall.)

If you don't want to use Jupyter, it will also work as any standard python library.

pip install pyknit

And then go ahead and import it into your Python program. There's also a minimal command line interface which could be expanded if anyone actually wants to use it.

Why pyKnit?

There's lots of great tools for knitters out there, but they're not open source, which means if I don't like the way they work, I'm often stuck with weird workarounds. I thought it would be fun to make some knitting tools that were a bit more flexible.

I knit during conference talks, and every year at PyCon I meet a few folk who stop by to ask what I'm knitting and or to show me what they're working on. So I know there's enough of an intersection between the knitting and Python communities for this to be fun for more than just me.

And finally, knitting involves a lot of math. Not every knitter loves math, and even those who do can get tired of calculating and recalculating. So why not let the computer do that work? I'd like to imagine a world where I could publish a pattern with an interactive notebook and let people fit sweaters specifically to their measurements, or figure out how to adjust a shawl if you want to use all of a pretty gradient skein of yarn, or have the option to add calculated stitch counts to every single row of your pattern so people can check if they messed something up.

It's going to be a while before we get to the complicated stuff, but you have to start somewhere!

Contributing

Got an idea for a function you wish we had? Think you found a bug? Let us know via the issues.

Know open source and want to just get into it? Make a pull request here

Never contributed to open source before? Not sure what open source is? Here's a guide on How to contribute to open source that includes information on why you might want to and how to do it. I work with new contributors regularly in my day job, so don't be shy! I'm happy to help you figure it out.

If you find a security issue and want to contact me privately, send me an email. It might feel silly to talk about security issues in knitting software, but it does parse things and display things, so it's possible!

License

pyKnit is licensed under the GPL-2.0 License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyknit-0.0.3.tar.gz (7.0 kB view details)

Uploaded Source

Built Distributions

pyknit-0.0.3-py3.8.egg (13.4 kB view details)

Uploaded Source

pyknit-0.0.3-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file pyknit-0.0.3.tar.gz.

File metadata

  • Download URL: pyknit-0.0.3.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6

File hashes

Hashes for pyknit-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3f3896dc34bddab1673943333aae0c70894eaf8ba22529efaa99ce331bd686ce
MD5 ff1ff784a0464966c530b99277253b21
BLAKE2b-256 544909668f1d1f6201b8e6f856fa61d8bcb147e92941b83afb560fc0272d6a37

See more details on using hashes here.

Provenance

File details

Details for the file pyknit-0.0.3-py3.8.egg.

File metadata

  • Download URL: pyknit-0.0.3-py3.8.egg
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6

File hashes

Hashes for pyknit-0.0.3-py3.8.egg
Algorithm Hash digest
SHA256 8f4075a7b3cbfcf184ca3d68780d534dbafef4841b878ddae94d5dbcd70a7fa3
MD5 4049235915cf2847ee979fa278041e12
BLAKE2b-256 95e9eaac1ac91229440d313432b7aa59c0f66871953a0483b7d83a34d82d278a

See more details on using hashes here.

Provenance

File details

Details for the file pyknit-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyknit-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6

File hashes

Hashes for pyknit-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4dc2d9d088c2475f4e17b002985105145dbaad4975affcecbb289651f2982315
MD5 64bc11b59f01822f95d3011d057b629f
BLAKE2b-256 21e0f90bc584f2749ff90eb1dbebc1695ac7bf7326388704721e381c0cbdd790

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page