#🔒 publishing python package/program
20 messages · Page 1 of 1 (latest)
@lost plank
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
You can host your own private package index, which works the exact same as pypi but hosted by you and as such lets you control who has access to it
typically we recommend just not making into things executable - just share the source code to whoever has to run it, or format as a package + add Entry points
Hey. the best option to distribute it without letting others see your code is by obfuscating the code. you can use pyarmor for that. converting your code into executable causes problems in many modules
I wouldn't call obfuscating a really good idea either tbh
and remember that secrets such as API keys are trivial to extract even if you obfuscate it, anything you send in a network request can and will be intercepted by malicious users
if the user owns the device the code's running in, that is the case even for https
There is no universal solution to protecting code. He can use multiple techniques to protect his code. he can use obfuscation on some part and can use encryption for important data. So the amount of protection he wants to add will depend on the knowledge of the person whom he wants to protect his code from
i'm not looking to obfuscate anything, it's just something private/internal meant for a few people, but they would effectively have access to the src either way, but conversely i don't want it public to the world
Is it in a professional context?
yes
does your company have anything like artifactory?
That said, hosting a repository is a different thing from distributing tools for your teams
We do not allow content or activity on PyPI that:
- uses obfuscation techniques to hide or mask functionality;
https://policies.python.org/pypi.org/Acceptable-Use-Policy/
as in jfrog artifactory? no we don't and i wouldnt want to spin up a private pypi for one thing anyway lol
alternatively i guess people could git clone the code and pip install it (assuming they have python already)
you can actually just pip install directly from a Github repo. This is how we manage internal Python packages.
pip install git+https://github.com/username/packagename
No internal wheel host?
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.