Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usage of --currency switch on prices and excel sheet #425

Closed
sebo83910 opened this issue Oct 26, 2020 · 12 comments
Closed

usage of --currency switch on prices and excel sheet #425

sebo83910 opened this issue Oct 26, 2020 · 12 comments

Comments

@sebo83910
Copy link

Hello,

I use kicost 1.1.4 with the switch currency set to EUR.
I have two remarks.

  • for a specific part, if i look at the distributor web site, the price given on the xls is slightly different. Is that a currency conversion is made within kicost itself?
  • for each distributor part number, there is a comment made showing the Qty/price break. The price are still in USD and not in EUR. More over, is it possible to enlarge the comment area? most of the time, there is not enough space to show the entire information.

Thanks for your excellent work!!

@hildogjr
Copy link
Owner

Yes, the conversion was introduced by me, it prioritize the values passed by the distributors and made conversion by CurrencyConverter python module, when not present. Usually, by the API, the distributors just provide USD or USD+EUR (but not always).

You can update CurrencyConverter, that have a static conversion database. Also, the spreadsheet have the currency rate listed bellow all your parts (edit them to update the values).

Because of this behavior: the currency rate may not be up-to-date and to use a online server to do that was necessary an API and user login and, the comments-balloons are static (doesn't change with the update of the cell with the current rate). I kept them as original distributor currency, it is not the best but it was what I though at the moment.

@sebo83910
Copy link
Author

Hi @hildogjr,
Is it possible to retrieve the data in EUR instead of USD? I mean without converting the price within the python? If look at mouser for instance, the prices migth be significantly different when I look at the website... The available quantity as well...

@hildogjr
Copy link
Owner

Yes, just not use --currency on call.

Some distributor have native USD and EUR and KiCost prioritize USD, but I didn't remember if EUR get deleted in this case on api_partinfo_kitspace.py functions.

The difference in qty is because we use KitSpace API, that update it database time-by-time on demand. The ffinal solution to this is have suport for all distributors APIs, but it demands some code #386.

@sebo83910
Copy link
Author

Now I'm confused. I removed the switch --currency and I have the same results. I thought everything would be in USD in this case...

@sebo83910
Copy link
Author

No sorry. I talked too fast sorry. USD by default without the switch.
I've been looking at the code but I can't find a way to retrieve the data in EUR form Mouser (as an example).
Moreother, I see a py file for octopart. Does the tool support octopart queries instead of kitspace?

@hildogjr
Copy link
Owner

hildogjr commented Jan 18, 2021

I think, specific Mouser (I am not sure) just have EUR in the KitSpace API, so USD is internally generated.

Yes, you can use Octopart instead Kitspace, just need to manually change the code that call into kicost.py. There isn't a command yet for this due #386 implementation missing.

@sebo83910
Copy link
Author

For Mouser, I don't know. it seems to me everything out of the call to KitSpace API is in USD or GBP.

I tried to switch to Octopart as you suggested:
api_octopart.query_part_info(parts, distributor_dict, currency).
It crashes so far.

@hildogjr
Copy link
Owner

You need you on KEY / license / registration to run Octopart.

GBP is the base currency for RS, if I remember...

@sebo83910
Copy link
Author

yes indeed, there is a key required along with a registration.
So, what's the current status for kicost? do you have a roadmap for future improvement of the tool?

@hildogjr
Copy link
Owner

hildogjr commented Jan 19, 2021

I have a personal roadmap, second some needs mine and others
https://github.com/xesscorp/KiCost/milestones
but not time to develop all by my self.

After fix this bunch of issue, we can return to v2 discussion #396.

Feel free if you can fix any of those issues. The forum is also missing Windows users to test the new features before release.

@hildogjr
Copy link
Owner

hildogjr commented May 5, 2021

There was some changes @set-soft of how the prices currencies are converted. @sebo83910, could you check the last code on this repository?

@set-soft
Copy link
Collaborator

  1. Now we update the currency conversion. So differences should be (now) some distributor detail.
  2. Now Octopart can be enabled from command line and/or environment. Seems to be working.
  3. I verified that using --currency EUR we are selecting the values in EUR (when available of course)

For the above reasons, and the lack of reply, I'm closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants