Dynamo Package in PyRevit -&- Github sharing Revit extension

Hello Everyone, i want to ask about how to include Dynamo Packages inside PyRevit, and how to share this Pyrevit extension with other colleagues through github private repo.

Actually i can explain my request in 2 main questions:

1- i have some dynamo scripts and i have already included them in a Revit Extension and created a new Revit tab using PyRevit, and it is working properly, but the question that i will implement these tabs in my work globally and i need to install them for many users in different countries, and these dynamo script includes many nodes from custom packages, so how to include these packages as a library in the Pyrevit extension so it will be installed automatically for users with installing the extension.

2- Also i have succeeded to create a github repo and upload my pyrevit extensions on it and i was able to clone and install from github, but only if the github repo is public, when i change to private and insert my username and password in the pyrevit extension during installation, it doesn’t work (i think i need to create access token in github or something like that), and i need to share my repo with my work colleagues globally, so they will be able to install it, in the same time i do not want to expose the scripts to public, so i was thinking to make it private and share 1 github account credentials with them but it is not working as explained, or to check the github enterprise but not sure if it will work the way i want or not.

Thank you in advance for your feedback .

Hello @Ayman_okail

It depends on the used packages. For most packages “installing” them is just moving the folders to the dynamo default packages folder.

If you share a network drive with all coworkers the easyest way is to set up everything there in a folder and tell all users to add this folder in the dynamo settings.

Or you move the packages to the dynamo default packages folder. You can do that for example on revit startup (startup.py) by taking the packages from a network drive or with a webrequest from anywhere else.

Hello gerhard.p
Thank you for your reply

but can i include these packages to be installed in the pyrevit extension automatically, so users do not need to copy and paste folders and files …etc.

the problem of the network drive that it will not work, because i am speaking about corporate level, different countries will use it.

so i am thinking about including them in the github repo but do not know how?

For sure, you can add any file to a repo and download it. But you will have to run some code that will move the files to the desired location, no big deal.
How does the download and install from github work? Manually? CLI?

ok i understand, i can add the packages files to the repo, and then from Revit, when the user install the extension “(by chosing it from the list which appear in Revit after the user add the json file that contains the extension URL from github)” then this will download the package files.

the problem is here, i do not want users to manage the copy and pase or running commands CLI , as they are not so much experienced to this level, they are just designer revit users, so …
the Lib or Bin folder in the pyrevit extension, i cannot somehow tell my scripts to refer to packages in this place, exactly like refering to a python library in the extension,

sorry for asking many questions, but its very important issue for me

It is bad practice to take dynamo package folders and put them elsewhere (e.g. github) and some packages it may actually not be permitted.

The best approach is to clearly document on your github which packages users should install in Dynamo in order to run your scripts, regardless of in pyrevit or not.

1 Like

Thankyou GavinCrump for your reply.

ok and regarding the githup private repo, do you have an idea why it is not working, or if i must have enterprise github account to make it work as a private repo?

Instead of doing all this, why not work with your colleagues in IT to get an installer built (meaning users double click on an application to get your tools on their system), or even have them deploy the tools globally for you via GPL or robocopy? Trying to do this without getting them involved will be a LOT more work and in some cases will wind up being blocked by infosec policies soon after you get them set up.

2 Likes

Yes private repo and access is limited to enterprise or paid private per user setup. You either go public or you pay.

1 Like